Visual studio crash on initializer refactoring (CC0009)

Visual studio crashes on the following code.
class Point
{
    public int X { get; set; }
    public int Y { get; set; }
}
Point GetPoint() { return null; }

Point myPoint;
void Foo()
{
    myPoint = GetPoint();
    myPoint.X = 5;
}

When I try to see the code fix VS crashes.

I have reproduced it. The error is happening at line 56 of the code fix provider.
https://github.com/code-cracker/code-cracker/blob/master/src/CSharp/CodeCracker/Style/ObjectInitializerCodeFixProvider.cs#L56
var objectCreationExpression = statement.DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single();

A diagnostic should not be raised for this situation, the code fix is correct, the problem is at the analyzer.

Done on #316, just let's wait for the merge.


ModuleNotFoundError: No module named 'rl'

I get the syntax error below when I run  ./run.py TensorforcePPOAgent --train 1000. I do not see a "rl" folder.
Is this correct?
from rl.agents import DDPGAgent

from rl.memory import SequentialMemory

from rl.random import OrnsteinUhlenbeckProcess

SyntaxError: invalid syntax

In [25]: !python ./run.py TensorforcePPOAgent --train 1000
Using TensorFlow backend.
Traceback (most recent call last):
  File "./run.py", line 22, in <module>
    from helper.baselines import *
  File "C:\Users\green\osim-rl-helper\helper\baselines\__init__.py", line 3, in
<module>
    from .keras import *
  File "C:\Users\green\osim-rl-helper\helper\baselines\keras\__init__.py", line
1, in <module>
    from .KerasDDPGAgent import KerasDDPGAgent
  File "C:\Users\green\osim-rl-helper\helper\baselines\keras\KerasDDPGAgent.py",
 line 5, in <module>
    from rl.agents import DDPGAgent
ModuleNotFoundError: No module named 'rl'

Hello! Have you tried installing the keras-rl package?

No, I haven't tried installing keras-rl. I will do that today.

Why is this issue still open? Is there any follow-up work?

I an getting this error in Colab
this is the output of the previous cell where I install keras-rl
Requirement already satisfied: keras-rl in /root/.local/lib/python3.7/site-packages (0.4.2)
Requirement already satisfied: keras>=2.0.7 in /root/.local/lib/python3.7/site-packages (from keras-rl) (2.2.4)
Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.7/dist-packages (from keras>=2.0.7->keras-rl) (1.15.0)
Requirement already satisfied: pyyaml in /root/.local/lib/python3.7/site-packages (from keras>=2.0.7->keras-rl) (5.3.1)
Requirement already satisfied: keras-applications>=1.0.6 in /root/.local/lib/python3.7/site-packages (from keras>=2.0.7->keras-rl) (1.0.8)
Requirement already satisfied: h5py in /root/.local/lib/python3.7/site-packages (from keras>=2.0.7->keras-rl) (2.10.0)
Requirement already satisfied: scipy>=0.14 in /usr/local/lib/python3.7/dist-packages (from keras>=2.0.7->keras-rl) (1.4.1)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.7/dist-packages (from keras>=2.0.7->keras-rl) (1.1.2)
Requirement already satisfied: numpy>=1.9.1 in /root/.local/lib/python3.7/site-packages (from keras>=2.0.7->keras-rl) (1.18.5)
then after import keras-rl:
ModuleNotFoundError                       Traceback (most recent call last)
 in ()
9 import keras.backend as K
10
---> 11 from rl.agents.dqn import DQNAgent
12 from rl.policy import LinearAnnealedPolicy, BoltzmannQPolicy, EpsGreedyQPolicy
13 from rl.memory import SequentialMemory
ModuleNotFoundError: No module named 'rl'

Try: pip install keras-rl2 if you were on colab

No, I haven't tried installing keras-rl. I will do that today.

yes, pip install keras-rl
this python packet solved this problem

I get the syntax error below when I run ./run.py TensorforcePPOAgent --train 1000. I do not see a "rl" folder.
Is this correct?
from rl.agents import DDPGAgent

from rl.memory import SequentialMemory

from rl.random import OrnsteinUhlenbeckProcess

SyntaxError: invalid syntax

In [25]: !python ./run.py TensorforcePPOAgent --train 1000
Using TensorFlow backend.
Traceback (most recent call last):
  File "./run.py", line 22, in <module>
    from helper.baselines import *
  File "C:\Users\green\osim-rl-helper\helper\baselines\__init__.py", line 3, in
<module>
    from .keras import *
  File "C:\Users\green\osim-rl-helper\helper\baselines\keras\__init__.py", line
1, in <module>
    from .KerasDDPGAgent import KerasDDPGAgent
  File "C:\Users\green\osim-rl-helper\helper\baselines\keras\KerasDDPGAgent.py",
 line 5, in <module>
    from rl.agents import DDPGAgent
ModuleNotFoundError: No module named 'rl'

You are don't install keras-rl2
You should ### pip install keras-rl


Added user specified sorting on the search page.

PR to address https://github.com/KnightOS/KnightOS/issues/257
Went with MS's asc/desc sorting convention, but am not attached to it (was easier to implement).

Thanks!


Is it possible to use more than one table? How processes know which table to use?

I dont really see anything in the docs. Can we use more than one table for inter-process memory management?
How does the worker differ between the tables - is it determined by the 'signature' of the table?
With mmap i'd been able to define the table by the filepath

Yes, you can create multiple tables and access based on different variables.


Use previous instead of next URL

My usual flow for entering URLs in logseq is:

Copy URL
Create a new block in logseq
Maybe write a short description or a task
Paste URL
Maybe add a tag or page reference

If I want the URL to expand to show its title I would always have to move my cursor to before the URL again (as obviously, after pasting the URL my cursor is at the end of the URL). I honestly can't envision any case where the cursor naturally ends up to be before the URL when pasting URLs.
So my question is: why is the next URL taken instead of the previous one? I'm very sure there is a rationale behind it, but I'm just too stupid to see it. 😅
Regardless I'd still ask for at least a second slash command which converts the previous URL if there is no technical reason to not do so.

That's a good point - I tend to think of my slash commands as /command ARG so that's how I mentally think about it, but there are a couple of other options
/title-all - converts all the urls in a block.
/title-previous - maybe... Anyway I need to think about that.

Just mulling on this further - I might check to see what's to the right and if nothing then to the left.

One final update, I remember why I did this a bit more as well, I wanted the closest URL to the command so that it wouldn't re-encode an encoded URL so I picked the right most URL.... I need to have a bit of a think about how to fix this more broadly

@ubuntudroid I have a question. If you had two URL's in a block and you did /title would you expect it to do all of them, one of them?

Good question! I personally would expect just the previous one to be converted, but tbh it is very rare for me to put more than one URL into a block as my blocks tend to be rather atomic.
Converting just one would certainly be more flexible than all of them. Probably another case for having multiple commands.


add where_document filter for chroma

Description: add where_document filter parameter in Chroma
Issue: 10082
Dependencies: no
Tag maintainer: for a quicker response, tag the relevant maintainer (see below),
Twitter handle: no

@hwchase17

cc @jeffchuber

@baskaryan the feature is good....
@PTTrazavi can we add this consistently across all search methods? can we also add a test for it to ensure that it doesn't get removed in the future?

OK, I added "where_document" across all search methods.

thanks @PTTrazavi!

thanks @PTTrazavi!


What is the license?

I want to build this app? What is its license?

It's open source GNU license.

Can you please tell me the procedure for building apk and ios in android studio if it is possible?

In this project i'm using Expo and to create apk or ios file you can use expo cli. You can read more about that in Expo docs - https://docs.expo.io/distribution/building-standalone-apps/
If you want to handle building process you can use expo eject command.


Update readme.md

I am very happy to accept PRs for the set of VSTS Extensions in this Repo. Here are a few guide lines that are really helpful if you follow when submitting PRs

In the PR comment state the problem you are addressing
Add a new release line entry in to the extensions readme.md file (usually found at the end of the file) that

does an increment of the minor version number e.g. 1.2 to 1.3
lists the Issue/PR number related to the change
a brief single line comment as change made
if the change adds new parameters update the appropriate documentation

If you are willing, enable me as the Repo owner, to edit your fork that contains your PR so I can add missing items such as the readme.md

Ah, sorry. I'm just learning my way around git. I'll close this PR off.


Light2D mask is ignored on shader with render_mode enabled (like blend_add)

Godot version:
v3.2.beta.custom_build.8eb183aeb
OS/device including version:
Windows 10
Issue description:
I do not know if this is a bug or correct behavior, but for me it was unexpected and undesired so I have created this ticket.
When shader use render_mode blend_add (or some other) then Light2D mask is not working for it.
This is what I want (render_mode is not set, light mask is a circle)

But when I enable render mode to (for example) blend_add then mask is ignored

Minimal reproduction project:
Light2DShaderBug.zip

Does this occur in both GLES2 and GLES3?

Does this occur in both GLES2 and GLES3?
Yes

We have experienced the same issue. This is both happening with additive and multiply.
We don't know if this is intended but from our view the Light2d mask should cull everything set under the cull layer.
It might be easier to see the issue in the image below. Its the same project as @p10tr3k uploaded.
When the sprite is set to Mix (default) it works correct but not when set to additive or multiply.


Inaccurate grad scale with the new sds loss

Description
Thanks a lot for your brilliant work.
Correct me if I am wrong. The grad scale of SDS loss should be multiplied by the loss instead of grad.
With the SDS loss formulated as loss = 0.5 * F.mse_loss(latents.float(), targets, reduction='sum') / latents.shape[0], the grad scale should applied to the loss by loss = loss * grad_scale. Instead of multiply it on the grad before calculating the target (here).
Steps to Reproduce
NA
Expected Behavior
NA
Environment
NA

My fault. There is no difference here.


User-configurable color/font/theme presets + a graphical utility

This might require hiding a lot of the coloring functions from script devs, or at least limiting their choices.

[ ] Basic config script

[x] Pull settings from ExtState

[ ] Write settings to ExtState

[x] Extract colors and fonts to a default theme file

[ ] Add colors to Configuration

[ ] Add fonts to Configuration

Popup menu for selecting colors from the existing list?

Font validation lights.

Is there any practical way to get a list of installed fonts?

Configurable parameters
doubleclickTime = 0.30
caretBlinkRate = 16
shadowSize = 1
tooltipTime = 0.7

colors = {
  windowBg
  tabBg
  elmBg
  elmFrame
  elmFill
  elmOutline
  txt
  shadow
  faded
}

fonts = {
  sans
  mono
}

dev = {
  gridMajor = 128,
  gridMinor = 16
}

I've merged a bunch of the prep work for this - refactoring, tidying, etc - but have decided to leave out the configuration script until I feel like there are enough options to be worth having it. Its usefulness will also depend on whether image-based themes happen, since at that point I would rather make the UI use image themes exclusively and just offer a script for switching between them.


How to use the sveltekit adapter?

Hi,
I am trying add a webhook-based bot setup to my SvelteKit app (I have some UI part as well and I want to just keep both of them together).
I tried doing webhookCallback(bot, "sveltekit") and using it in a sveltekit endpoint as shown below:
export const POST: RequestHandler = async (event) => {
    return webhook(event)
};

But, when I invoke this endpoint, I get :
Cross-site POST form submissions are forbidden

(I know this error is sveltekit error - happening due to event.fetch usage?). I just don't know if this is the right way to do it or some other approach exists.
EDIT: Turning off csrf by setting checkOrigin: false in svelte.config.js is one way to go. not sure if it's the best way (I tried setting ORIGIN to the address sveltekit is serving at. but it was still giving the same error)

Why is it cross-site? The webhook request comes from api.telegram.org and all requests go against api.telegram.org.

Ah I get this now. I made a request from localhost to see if it responds properly (just to see if the endpoint is even working). I guess it made an api call to telegram with the fetch provided by svelte which is tied to incoming request (so origin set to localhost). Hence cross site.

I see. Yes, then you need to enable CORS.

Closing due to inactivity. Feel free to comment if there are still open questions.


Allow Accept headers to be sent regardless if they're defined in the OAS

This should resolve the issue brought up in https://github.com/readmeio/api/pull/447. Basically if an Accept header isn't defined in a paths parameters block we currently don't allow you to supply it in the metadata argument. Because Accept headers defined in parameters should actually be ignored (per the spec) we should instead do a couple things:

[ ] If a path has responses (optional in OpenAPI 3.1) and responses.*.content present we should default to sending an Accept header for whichever media type is JSON-compatible.
[ ] If no media type in the response content is JSON-compatible we should pick the first and send that.

[ ] We should also not do res.json() when returning the response as that'll throw JSON parsing errors.

[ ] If an Accept header is present in metadata, allow it through regardless if its value matches a media type in responses.*.content.

Hey @erunion, will this enhancement make it into v5?

@bennycode Yeah I'm planning on digging into this starting Monday.


Possibility the update modules

We should have to possibility to type this commands:

elm-package update: it lists updates and ask you if you want to install theses updates
elm-package update X where X is the module name

Having something like this makes sense. I am tracking ideas like this separately, so I do not think having this issue open makes things more or less likely.


Permissions aren't being checked 1.13.2 Spigot

I have created a fresh install of spigot 1.13.2, I have several servers on a waterfall (bungeecord) network and had no issues with luckperms before. Unless i am op'ed I cant use any command. I have verified that the server name in LP config and server name used for commands are the same. I have included all the info I can think to add about the server. All the screenshots are just as a proof thing showing that I didn't screw that part up.
Here is some verbose. I had the player de-op'ed and try to run gm commands. He had 3 perms for the "aquatic" server where this is happening. luckperms.* minecraft.* and "". He should have everything now but still can't run /gm 0. Here is the verbose during that.
https://luckperms.github.io/verbose/#yEkj52YcD0
I then gave him essentials. and tried again. Verbose for that
https://luckperms.github.io/verbose/#wang0P177K
I verified that I'm not removing essentials.* anywhere
https://drive.google.com/file/d/1Sbly_FMIsWuNBpVMXJoUu2QjK6g488Xf/view
Screenshots showing the results of /lpb user username info and /lp user username info
/lpb https://drive.google.com/file/d/1PnmsLWZbRS-KbVxdguCG2yxKsoTl3-3I/view
/lp https://drive.google.com/file/d/1mUxii9ZHYSUCU_OfA3wTxJXVzIcinLX8/view
The uuid's are good, I set up that part right.
It doesn't matter what the perm is or what groups/users I give them to, LP just won't say the user can run the commands.
My current plugin list:
spigot-1.13.2
worldguard-legacy-7.0.0-beta01.jar
worldedit-bukkit-7.0.0-beta-01.jar
Vault.jar
UltimateChat-JDA.jar
UltimateChat-1.8.8-b200-Universal.jar
Ridables.jar
mcMMO.jar
LuckPerms-Bukkit-4.3.25.jar
GriefPrevention.jar
EssentialsXSpawn-<IP_ADDRESS>.jar
EssentialsX-<IP_ADDRESS>.jar
CoreProtect-2.15.1.jar
BungeeTabListPlus_BukkitBridge-2.8.9.jar
Current LP config, in case I screwed something up in there.
https://hastebin.com/anuseroven.shell

You should set a messaging service (since you're using MySQL you can use sql) to make changes apply on all servers.

Is that not default when using MySQL?
`# - Possible options:
=> sql       Uses the SQL database to form a queue system for communication. Will only work when
'storage-method' is set to MySQL or MariaDB. This is chosen by default if the
option is set to 'none' and SQL storage is in use. Set to 'notsql' to disable this.`
This is the only server that has a version of LP with a sql option for messaging service. Once I get this set up im going to move them all to redis. It looks like redis is the only option between all versions of LP that I'm running.

You have set include-global and include-global-world to false in your config, that's your problem.

As for messaging service, you really don't need to use Redis unless you have multiple Bungeecord instances. sql is the best option there and you're right in that it does default to that if it's set to none, though I'd set it to sql just in case. If your config files don't mention it then they are probably outdated.

... You have any idea how annoying it is that one little config setting that i over looked is the reason that 3 different people couldn't fix this. One of them being an Unlucky (MOD) from discord. Thank you, include-global-world should have been set to true. Include-global should be set to false for my use. The version of LP that I have loaded on all the other servers are old. They were established a while back and haven't had a need to update yet. That's why there is no sql config option for messaging service.
Thank you for figuring it out.


Unable to change number of names shown per page - Error 500

Leave FeedbackFrontend version: 2c59729 December 8, 2020 4:31 AMBackend version: 74a5865 December 10, 2020 3:59 AM
Working with Tasks for World Plants in the clearinghouse, I open report for Manuscript Names (953 of 1010). Default setting 50/page, and long report on 21 pages. I have tried to change setting as 500/page, and got Error 500:

Same as other postgres problems at that time:
PSQLException: ERROR: out of shared memory
  Hint: You might need to increase max_locks_per_transaction.

I have changed pg settings since


fixing the rest point leak

Hi @vinitsuri, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

:clock1:


how to make digram like yours on readme?

@ivica-k

That would be @dmolenaars actually :)

@dmolenaars hey!

@coderj001  -> https://asciiflow.com/#/


D435 box dimensions

Required Info

Camera Model
D435

Firmware Version
(<IP_ADDRESS>)

Operating System & Version
Win (10)

Kernel Version (Linux Only)

Platform
PC

SDK Version
2.16.1

Language
C#

Segment
Automation

Hi All, I am having trouble getting box dimensions from the the D435.
The first issues is that the depth frame and color frames are not aligned because of the FOV. I can use the Align method, however it aligns every pixel and slows down the frame rate dramatically. Slows it down so much that the syncer throws an error after a minute or two: Frame didn't arrived within 5000

My objective is to measure a box from top down.
Note the red circles is where I am trying to measure.

I can use the rs-measure example to accurately measure the box, however because the C# wrapper does not have a wrapper for rs2_deproject_pixel_to_point I had to write my own in c# (it is only Math processing). The results are very very wrong through. Is it because of the BrownConrady intrinsic model? the Assert fails in my C# version.
static float[] DeprojectPixelToPoint(Intrinsics intrin, PointF pixel, float depth)
{
//Debug.Assert(intrin.model != Distortion.BrownConrady); // Cannot deproject from a forward-distorted image
Debug.Assert(intrin.model != Distortion.Ftheta); // Cannot deproject to an ftheta image
var ret = new float[3];
float x = (pixel.X - intrin.ppx)/intrin.fx;
float y = (pixel.Y - intrin.ppy)/intrin.fy;
if (intrin.model == Distortion.BrownConrady)
{
float r2 = xx + yy;
float f = 1 + intrin.coeffs[0]r2 + intrin.coeffs[1]r2r2 + intrin.coeffs[4]r2r2r2;
float ux = xf + 2intrin.coeffs[2]xy + intrin.coeffs[3](r2 + 2xx);
float uy = yf + 2intrin.coeffs[3]xy + intrin.coeffs[2](r2 + 2yy);
x = ux;
y = uy;
}
ret[0] = depthx;
ret[1] = depthy;
ret[2] = depth;
return ret;
}
Get distance 3d in c#:
public static float GetDistance_3d(this DepthFrame frame, PointF from, PointF to, Intrinsics intr)
{
// Query the frame for distance
// Note: this can be optimized
// It is not recommended to issue an API call for each pixel
// (since the compiler can't inline these)
// However, in this example it is not one of the bottlenecks
var vdist = frame.GetDistance((int)from.X, (int)from.Y);
var udist = frame.GetDistance((int)to.X, (int)to.Y);
        // Deproject from pixel to point in 3D

        var upoint = DeprojectPixelToPoint(intr, from, udist);
        var vpoint = DeprojectPixelToPoint(intr, to, vdist);

        // Calculate euclidean distance between the two points
        return (float)Math.Sqrt(Math.Pow(upoint[0] - vpoint[0], 2) +
                    Math.Pow(upoint[1] - vpoint[1], 2) +
                    Math.Pow(upoint[2] - vpoint[2], 2));
    }

My main issue I think is converting points to pixel space [0,1]. If I run the measure example, and put a breakpoint in the code, and take the pixel x/y coordinates then put them into the c# app, the coordinates are not where they should be.
Any help would be much appreciated.
Thanks
Craig

Ah that makes sense. A little confused as to why there would be a significant difference between aligning Color to Depth or Depth to Color. Do you mind elaborating abit more about that? Or is there a link to where I can find the relevant information to read that up on? Many many thanks! 😄

[Realsense Customer Engineering Team Comment]
Hi @HippoEug,
Basically, the aligned base is different. Aligning color to depth is based on depth image. Aligning depth to color is based on color image.
They have their own extrinsic parameters for transformation between point to point.

Sincere apologies to @AussieGrowls for hijacking the thread first of all.
@RealSense-Customer-Engineering thank you for your reply. A quick question:
For my use-case, I am trying to use the D435 to get the z-values/depth of a wound on the human body. The rough process is I provide the user a Color image/frame and get them to select the circumference of the wound. The program would then get these (x, y) coordinates from the user's input, and look up these (x, y) values from the Depth frame to get the z value.
In this particular use case, should I align color to depth, or depth to color? Danke!

[Realsense Customer Engineering Team Comment]
Hi @HippoEug,
Since you provide a color image to interactive with users, you can try to align Color to Depth and get the correspondent depth from color pixel selected.
You can also review #2523.

Thanks all, aligning to depth seems to have a small increase in performance.
I still have the issue converting points to pixels though.

The green circles in the above are the pixel coordinates I took from the rs_measure example, yet they are very different to the pixel coords in the c# app.
The SDK is built from source, not precompiled.
This is the measurement I took in the rs_measure example:

I put a breakpoint on this, and took the pixels (from and to) that the dist_3d method requires:
`auto from_pixel = s.ruler_start.get_pixel(depth);
auto to_pixel =   s.ruler_end.get_pixel(depth);

float air_dist = dist_3d(depth, from_pixel, to_pixel);`

The green circles are the pixel x/y from that breakpoint.

Actually, I am having trouble aligning color frame to depth frame. I keep getting and AccessViolationException in Intel.Realsense.dll.
The one frame I saw, before it threw the exception, was in fact what I was looking for regarding the location of the green circles (they aligned with the box corners as expected).
However it keeps crashing. See code snipit below, taken from the cs-tutorial-3-processing example :
`
public CaptureWindow()
{
try
{
pipeline = new Pipeline();
colorizer = new Colorizer();
Align align = new Align(Stream.Depth);
            var cfg = new Config();
            cfg.EnableStream(Stream.Depth, 1280, 720, Format.Z16);
            cfg.EnableStream(Stream.Color, 640, 360, Format.Bgr8);

            pipeline.Start(cfg);

            var token = tokenSource.Token;

            var t = Task.Factory.StartNew(() =>
            {
                while (!token.IsCancellationRequested)
                {
                    var frames = pipeline.WaitForFrames();
                    using (var releaser = new FramesReleaser())
                    {
                        var frames2 = align.Process(frames, releaser);
                        var colorized_depth_frame = colorizer.Colorize(frames2.DepthFrame);
                        var color_frame = frames2.ColorFrame;

                        UploadImage(imgDepth, colorized_depth_frame);
                        UploadImage(imgColor, color_frame);

                        // It is important to pre-emptively dispose of native resources
                        // to avoid creating bottleneck at finalization stage after GC
                        // (Also see FrameReleaser helper object in next tutorial)
                        frames2.Dispose();
                        frames.Dispose();
                        colorized_depth_frame.Dispose();
                        color_frame.Dispose();
                    }
                }
            }, token);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
            Application.Current.Shutdown();
        }

        InitializeComponent();
    }

`

Ok, I downloaded the latest 2.16.3, and it now works to align color to depth frame.

using the cs-tutorial-2-capture:
`using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
namespace Intel.RealSense
{
///
/// Interaction logic for Window.xaml
///
public partial class CaptureWindow : Window
{
private Pipeline  pipeline;
private Colorizer colorizer;
private CancellationTokenSource tokenSource = new CancellationTokenSource();
    static Action<VideoFrame> UpdateImage(Image img)
    {
        var wbmp = img.Source as WriteableBitmap;
        return new Action<VideoFrame>(frame =>
        {
            using (frame)
            {
                var rect = new Int32Rect(0, 0, frame.Width, frame.Height);
                wbmp.WritePixels(rect, frame.Data, frame.Stride * frame.Height, frame.Stride);
            }
        });
    }

    public CaptureWindow()
    {
        InitializeComponent();

        try
        {
            Action<VideoFrame> updateDepth;
            Action<VideoFrame> updateColor;

            // The colorizer processing block will be used to visualize the depth frames.
            colorizer = new Colorizer();

            // Create and config the pipeline to strem color and depth frames.
            pipeline = new Pipeline();

            var cfg = new Config();
            cfg.EnableStream(Stream.Depth, 640, 480);
            cfg.EnableStream(Stream.Color, Format.Rgb8);

            var pp = pipeline.Start(cfg);

            SetupWindow(pp, out updateDepth, out updateColor);

            Task.Factory.StartNew(() =>
            {
                Align align = new Align(Stream.Depth);
                while (!tokenSource.Token.IsCancellationRequested)
                {
                    // We wait for the next available FrameSet and using it as a releaser object that would track
                    // all newly allocated .NET frames, and ensure deterministic finalization
                    // at the end of scope.

                    using (var frames = pipeline.WaitForFrames())
                    {
                        var frames2 = align.Process(frames).DisposeWith(frames);
                        var colorFrame = frames2.ColorFrame.DisposeWith(frames2);
                        var depthFrame = frames2.DepthFrame.DisposeWith(frames2);

                        // We colorize the depth frame for visualization purposes, .
                        var colorizedDepth = colorizer.Process(depthFrame).DisposeWith(frames);

                        // Render the frames.
                        Dispatcher.Invoke(DispatcherPriority.Render, updateDepth, colorizedDepth);
                        Dispatcher.Invoke(DispatcherPriority.Render, updateColor, colorFrame);
                    }
                }
                align.Dispose();
            }, tokenSource.Token);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
            Application.Current.Shutdown();
        }
    }

    private void control_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    {
        tokenSource.Cancel();
    }

    private void SetupWindow(PipelineProfile pipelineProfile, out Action<VideoFrame> depth, out Action<VideoFrame> color)
    {
        using (var p = pipelineProfile.GetStream(Stream.Depth) as VideoStreamProfile)
            imgDepth.Source = new WriteableBitmap(p.Width, p.Height, 96d, 96d, PixelFormats.Rgb24, null);
        depth = UpdateImage(imgDepth);

        using (var p = pipelineProfile.GetStream(Stream.Color) as VideoStreamProfile)
            imgColor.Source = new WriteableBitmap(p.Width, p.Height, 96d, 96d, PixelFormats.Rgb24, null);
        color = UpdateImage(imgColor);
    }
}

}
`

Ok now the issue is that the aligned color frame looks to be a blend of color and depth frames, which makes it impossible to use open CV to get box dimensions.
notice the noise on the color image?

@AussieGrowls Did you ever figure this out?
I'm trying to perform measurements in C# as well and am getting inaccurate measurements (compared to rs_measure) which I believe is due to not correctly mapping the x/y coordinates. My image alignment seems to be working correctly.
I'd be very interested to know where you're at with it. Thanks!

I did. I am using Emgu, and realsense c# wrapper. Both the latest version. I had to download, compile and build the latest realsense 2.16.5 source, with the CSHARP option turned on in cmake. This is required as I think there was a bug in the version I had when starting this thread, and align just would not work.
setting up, resolution 640 x 480 or 1280 x 720:
`
pipeline = new Pipeline();
        var cfg = new Config();
        cfg.EnableStream(Stream.Depth, Convert.ToInt32(ConfigurationManager.AppSettings["ResolutionWidth"]),
            Convert.ToInt32(ConfigurationManager.AppSettings["ResolutionHeight"]), Format.Z16);
        cfg.EnableStream(Stream.Color, Convert.ToInt32(ConfigurationManager.AppSettings["ResolutionWidth"]),
            Convert.ToInt32(ConfigurationManager.AppSettings["ResolutionHeight"]), Format.Rgb8);

        try
        {
            pp = pipeline.Start(cfg);
        }
        catch (Exception ex)
        {
            Notify(
                "FATAL ERROR Starting process, cannot start video pipeline, ex: " +
                ex.Message, Color.Red);
            return;
        }
        depthintr = (pp.GetStream(Stream.Depth) as VideoStreamProfile).GetIntrinsics();`

for every frame, apply filters then convert to Iimage for emgu to use:
` using (var releaser = new FramesReleaser())
{
using (var frames = pipeline.WaitForFrames().DisposeWith(releaser))
{
//filters to be used, Hole filler seems to work best for color frame to then get canny edges from CV
var processedFrames = frames
//.ApplyFilter(decimate).DisposeWith(releaser)
.ApplyFilter(spatial).DisposeWith(releaser)
//.ApplyFilter(temp).DisposeWith(releaser)
.ApplyFilter(holeFilter).DisposeWith(releaser)
.ApplyFilter(align).DisposeWith(releaser)
.ApplyFilter(colorizer).DisposeWith(releaser);
                var colorFrame = processedFrames.ColorFrame.DisposeWith(releaser);
                var colorizedDepth = processedFrames[Stream.Depth, Format.Rgb8].DisposeWith(releaser) as VideoFrame;
                var depthFrame = processedFrames.DepthFrame.DisposeWith(releaser);

                //convert to CV images
                Image<Bgr, Byte> ColorCV;
                Image<Gray, Byte> GrayCV;
                using (Bitmap image = new Bitmap(colorFrame.Width, colorFrame.Height, colorFrame.Stride,
                    System.Drawing.Imaging.PixelFormat.Format24bppRgb, colorFrame.Data))
                {
                    ColorCV = image.ToOpenCVImage<Bgr, byte>().DisposeWith(releaser);
                    GrayCV = image.ToOpenCVImage<Gray, byte>().DisposeWith(releaser);
                }
                Image<Bgr, Byte> DepthCV;
                using (Bitmap image = new Bitmap(depthFrame.Width, colorizedDepth.Height,
                    colorizedDepth.Stride,
                    System.Drawing.Imaging.PixelFormat.Format24bppRgb, colorizedDepth.Data))
                {
                    DepthCV = image.ToOpenCVImage<Bgr, byte>().DisposeWith(releaser);
                }

.........
I didnt use decimate filter, because it changes the resolution of the frame. I then just blur, dilate/erode, and canny edge detection in emgu. once I have the box(rotatedrect in emgu) I get the depth:
var dX = (int) largestbox.Center.X;
var dY = (int) largestbox.Center.Y;
var depth = depthFrame.GetDistance(dX, dY);
//and measure it:
var verts = largestbox.GetVertices();
PointF left = verts[0];
PointF top = verts[1];
PointF right = verts[2];
PointF bottom = verts[3];
var wdist = depthFrame.GetDistance_3d(right,
bottom, depthintr, depth);
var hdist = depthFrame.GetDistance_3d(top,
right, depthintr, depth);
`
GetDistance_3d is one of my helper methods:
`
public static float GetDistance_3d(this DepthFrame frame, PointF from, PointF to, Intrinsics intr,
float singleDist = 0f)
{
// Query the frame for distance
// Note: this can be optimized
// It is not recommended to issue an API call for each pixel
// (since the compiler can't inline these)
// However, in this example it is not one of the bottlenecks
        float vdist;
        float udist;
        if (singleDist == 0f)
        {
            vdist = frame.GetDistance((int) @from.X, (int) @from.Y);
            udist = frame.GetDistance((int) to.X, (int) to.Y);
        }
        else vdist = udist = singleDist;

        // Deproject from pixel to point in 3D

        var upoint = DeprojectPixelToPoint(intr, from, udist);
        var vpoint = DeprojectPixelToPoint(intr, to, vdist);

        // Calculate euclidean distance between the two points
        return (float) Math.Sqrt(Math.Pow(upoint[0] - vpoint[0], 2) +
                                 Math.Pow(upoint[1] - vpoint[1], 2) +
                                 Math.Pow(upoint[2] - vpoint[2], 2));
    }

static float[] DeprojectPixelToPoint(Intrinsics intrin, PointF pixel, float depth)
{
//Debug.Assert(intrin.model != Distortion.BrownConrady); // Cannot deproject from a forward-distorted image
Debug.Assert(intrin.model != Distortion.Ftheta); // Cannot deproject to an ftheta image
var ret = new float[3];
float x = (pixel.X - intrin.ppx)/intrin.fx;
float y = (pixel.Y - intrin.ppy)/intrin.fy;
if (intrin.model == Distortion.BrownConrady)
{
float r2 = xx + yy;
float f = 1 + intrin.coeffs[0]r2 + intrin.coeffs[1]r2r2 + intrin.coeffs[4]r2r2r2;
float ux = xf + 2intrin.coeffs[2]xy + intrin.coeffs[3](r2 + 2xx);
float uy = yf + 2intrin.coeffs[3]xy + intrin.coeffs[2](r2 + 2yy);
x = ux;
y = uy;
}
ret[0] = depthx;
ret[1] = depthy;
ret[2] = depth;
return ret;
}
static float[] ProjectPointToPixel(Intrinsics intrin, float[] point)
{
float[] pixel = new float[2];
//assert(intrin->model != RS2_DISTORTION_INVERSE_BROWN_CONRADY); // Cannot project to an inverse-distorted image
        float x = point[0]/point[2], y = point[1]/point[2];

        if (intrin.model == Distortion.ModifiedBrownConrady)
        {

            float r2 = x*x + y*y;
            float f = 1 + intrin.coeffs[0]*r2 + intrin.coeffs[1]*r2*r2 + intrin.coeffs[4]*r2*r2*r2;
            x *= f;
            y *= f;
            float dx = x + 2*intrin.coeffs[2]*x*y + intrin.coeffs[3]*(r2 + 2*x*x);
            float dy = y + 2*intrin.coeffs[3]*x*y + intrin.coeffs[2]*(r2 + 2*y*y);
            x = dx;
            y = dy;
        }
        if (intrin.model == Distortion.Ftheta)
        {
            float r = (float) Math.Sqrt(x*x + y*y);
            float rd = (float) (1.0f/intrin.coeffs[0]*Math.Atan((2*r*Math.Tan(intrin.coeffs[0]/2.0f))));
            x *= rd/r;
            y *= rd/r;
        }

        pixel[0] = x*intrin.fx + intrin.ppx;
        pixel[1] = y*intrin.fy + intrin.ppy;
        return pixel;
    }

public static Image<TColor, TDepth> ToOpenCVImage<TColor, TDepth>(this Bitmap bitmap)
where TColor : struct, IColor
where TDepth : new()
{
return new Image<TColor, TDepth>(bitmap);
}
`

@AussieGrowls Thanks for sharing. While comparing my code to yours, I found that a typo in my deprojection function was to blame for my inaccurate measurements.
FYI - I noticed what may be a mistake in your code. It looks like the assignment of the vdist and udist variables in your GetDistance_3d method may be reversed. I think vdist should store the distance of the "to" point, while udist should have the distance of the "from" point. The formatting of your code didn't come across very well, so maybe I'm misreading it, but wanted to give you a heads up.

@joshberry thanks for the pickup of the swap. The reads were still showing as right so I missed it.

[Realsense Customer Engineering Team Comment]
Is everything clarified? Still need any support for this topic?

I would like to measure the object size using Intel RealSense. During the research I found this issue.
@AussieGrowls is there a repository for your project where I can also see how you solved the image acquisition and image renering in the GUI (drawing the lines, points, ....)?


OnCondition is not correctly caching expressions causing constant expression.Parse calls

Description
OnCondition.GetExpression() was caches the root expression, but all of the children which override GetExpression() were not. This means all child conditions which overrode GetExpression() were calling Expression.Parse() on EVERY call, causing us to parse and allocate Expression obejcts every time we evaluated an trigger. This creates a huge overhead for evaluating triggers. This was an architectural regression introduced in refactoring in 2019 via commit fe54372,
Specific Changes

changed GetExpression() documentation to state that it must return CACHED expression
Moved all of the creation logic to protected virtual method CreateExpression().  This should be backward compatible with classes which do override this method but creates a pattern that causes correct behavior for all OnCondition classes written in the future.
Changed all of our OnCondition classes from public GetExpression() => protected CreateExpression()

Testing

Added unit test to verify that GetExpression() is always returning cached expression objects.

We should code review this, merge it into master.  if we/when we cut a .1 patch release, we should cherry pick this into that branch and pick this up along with any other .1 bits

@tomlm  the build and tests are failing.  ConditionalsTests_VerifyGetExpression can be fixed with the following:
new OnIntent() { Intent = "test" },

OnIntent.CreateExpression:
        protected override Expression CreateExpression()
        {
            // add constraints for the intents property
            if (string.IsNullOrEmpty(this.Intent))
            {
                throw new InvalidOperationException($"The {nameof(this.Intent)} property is null or empty.");
            }

This PR does not appear to be backwards compatible.  Considering it is a bug fix, maybe it doesn't matter?

@tomlm could you please address the comments? Thank you.

yeah, weird, I thought I ran the unit test before I checked it in.  Your fix was the correct one, it's not a backward compatibiliity issue, but new unit test was wrong.

In reply to: 724862257 [](ancestors = 724862257)


setTypeface method

I want to change font of button text, but there is no method for it! also my button text language is Persian and default font is not suitable for my app.
please help me :)

hi ,i have add setTypeface method in release 1.4. you can change the font of button by the method.


Scraping URL from webpage

I have a particular webpage that lists out various products. When I click each product listing it opens up a new tab to show further details.
To continue with my automation task I have used the popup function. However the links are dynamic for each new tab. I can scrape those from the main product listing page. How can I collect all the href tags and it's values in TagUI. I didn't find any help in the docs. I was hoping to use some web scraping tools in .tag file //as JS code. Is this the right way to go or are there any alternatives?

Hello @asishRye
Here's a quick sample on how to collect the href text for top 5 apple products on Shopee, push the text into an array and subsequently visit the links.
https://shopee.sg/search?keyword=apple
list = []
for i from 1 to 5
	read //*[@class="row shopee-search-item-result__items"]/div[`i`]/a/@href to url
	js list.push(url)
for i from 0 to 4
	js url = list[i]
	https://shopee.sg`url`

Hope this helps!

yes this is perfect, thanks @ruthtxh for the help.


remove unused calico variable "etcd_service_name"

[x] Installs cleanly on a fresh build of most recent master branch
[x] Upgrades cleanly from the most recent release
[x] Updates documentation relevant to the changes

The documentation is incorrect, this variable is never used elsewhere.

all green, lgtm


English version of the Readme.md ?

Do you want help with English version of the Readme.md? I am using your library in my application, will be happy to help 👍

Nice hero, you can change every thing to make English native in project.

@cougarm6  you can change every thing in readme.md

@cougarm6  hello do you have time to help with english version of readme

Sure, can I do it next week?
On Tue, Nov 28, 2017 at 8:37 AM, Nathen<EMAIL_ADDRESS>wrote:

@cougarm6 https://github.com/cougarm6 hello do you have time to help
with english version of readme
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/lipangit/JiaoZiVideoPlayer/issues/720#issuecomment-347399765,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGEpULETOZMU8Yy0bqSkMen41IGiS3nAks5s63jpgaJpZM4MSLrY
.

ok


Predator 1.0.0

@ryadav88

I re-ran the tests. @NivLipetz can you also add a getting started example documentation for this package here: https://github.com/dcos/examples

@NivLipetz @ryadav88 FYI - I re-ran the tests they've all passed.

@ryadav88 added examples to the dcos/examples repo. PR found here: https://github.com/dcos/examples/pull/392


Improve ImageryLayer.cancelReprojections() handling

Same as #9161 but in the main cesium repo, since I don't have commit access to @chris-cooper's branch. Also updates CHANGES.md.
This looks good to me, but someone else should review because I wrote it a year-ish ago.
We reproject web mercator imagery to geographic using a ComputeCommand. When the reproject command is created, we flip the imagery tile to the TRANSITIONING state. When the command completes, the state becomes READY. The problem is, when a new terrainProvider is set, cancelReprojections gets called, which simply throws away all pending imagery layer compute commands. If that happens after the reproject command is created but before it executes, then the imagery tile will never exit the TRANSITIONING state and any terrain tiles that its attached to will never be able to render.
So this PR extends a ComputeCommand with a canceled callback, and calls the callback before the command is thrown away. That way the imagery tile knows that it still needs to be reprojected later with a new command.
Fixes #6021

Thanks for the pull request @kring!

:heavy_check_mark: Signed CLA found.
:grey_question: Unit tests were not updated.

Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.
[ ] Works (or fails gracefully) in IE11.

@IanLilleyT @lilleyse @likangning93 any chance one of you can review/merge this for the release tomorrow? (Only if it's the clear cut good change we think it is of course)

I can't seem to trigger the problem where half the globe is missing but I do occasionally see lower-res imagery get stuck, which is fixed on this branch.

I pushed a small style fix: https://github.com/CesiumGS/cesium/pull/9163/commits/3f81df1bf0ca32fe9d6a2c7d3921e4f830049608


Avoid showing "NaN%" in the charts when there is no prev data

We have some statistics up on the paratime dashboards. However, when comparing to the current data to the previous one (whatever that means for the current setting), if the previous one was 0, when calculating the change, we get a division by zero error, and hence, NaN.
As discussed with @donouwens , in these situations, we should simply hide the percentage value. Like this:

Before:
After:

Wait this doesn't work like I thought. If it was division by zero it would print Infinity, not NaN

1/0 is infinity, but 0/0 is NaN. Bottom line, we just shouldn't divide by zero.


PHP 5.5 generators

It might be possible to do some sort of co-operative multitasking by using generators, which could potentially replace promises in the future.

TaskJS: http://taskjs.org/
em-synchrony: https://github.com/igrigorik/em-synchrony

Note: It has been done in python as well.

This was already linked in the above discussion, but I'd to reiterate that RecoilPHP is probably the way to go if you want to use async coroutines with ReactPHP :tada:
I believe this has been resolved, so I'm closing this for now. Please report back otherwise and we can reopen this :+1:


[Request] Upgrade CapFrameX

Prerequisites

[X] I have searched all issues/PRs to ensure it has not already been reported or fixed.

Criteria

[X] Reasonably well-known and widely used (e.g. if it's a GitHub project, it should have at least 100 stars and/or 50 forks)
[X] English interface (or at least English documentation)
[X] Latest stable version
[X] Full version (i.e. not a trial version)
[X] Fairly standard install (e.g. uses a version-specific download URL, no elaborate pre/post install scripts)

Name
capframex
Description
Frametime capture and analysis tool
Homepage
https://www.capframex.com/
Download Link(s)
https://cxblobs.blob.core.windows.net/releases/CapFrameX_v1.7.1_Portable.zip
Some Indication of Popularity/Repute
499 stars on GitHub

I want to do some extra changes to this scoop - migrate it from using github to capframex.com
Should I create another PR for this issue?

I want to do some extra changes to this scoop - migrate it from using github to capframex.com Should I create another PR for this issue?

Yes, you can create a new issue stating a new problem and create a new pull request to close the previous issue. this issue can now be closed.


LCM Inpaint Diffuser

PR to implement Inpaint for LCM
It will use the InpaintLegacy process as it does not have a specific Inpiant model

[ ] Create Diffuser paste on Image2Image
[ ] Create Mask image
[ ] Add noise to Mask after Step has run

In theory it should be
var noiseLatentTensor = scheduler.AddNoise(imageLatents, noise, timestep);
latents = (1f - maskTensor) * noiseLatentTensor + (maskTensor * latents)

nice!!!


twint -u username return small number of tweets

#264 Initial Check

twint -u username return small number of tweets
[QUESTION] how to get all tweets

Make sure you've checked the following:

[] Python version is 3.6;
[] Updated Twint with pip3 install --user --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint;
[] I have searched the issues and there are no duplicates of this issue/question/request.

Command Ran

twint -u username

Environment Details

Using mac terminal

try the --profile-full option
or try formatting a manual search: -s "from:username"
see what you get

I also suggest you to do your search via browser and see how far back it goes

--profile-full option: it's gather approximately 3000 tweets
the user had 52 K of tweets
I'm trying now with -s

-s return same small number

What do you see if you scroll manually with your browser?

sorry,  lost the track.. why do i have to scroll the browser?

So that we know if it's Twitter is acting in a strange way, or just because "that's it" the situation

Scrolling down with the browser is the same thing as running Twint until it stops by itself, we'd be cool to know if the results are the same

just want to update you about an automatic scrolling for both tweets and likes  from twitter.com and mobile.twitter.com and goth the following:
- tweets:
result in terminal: it returns until 16/07/2017
twitter.com result from auto scrolling: returns until 26/10/2017
mobile.twitter.com: returns until 26/10/2017
likes:
result in terminal: it returns until 29/04/2013
twitter.com result from auto scrolling: returns until Mar 2012
mobile.twitter.com: returns until November 2012
and both mobile and normal web are crashed while it is not while running auto scrolling in tweets

tweets
So you got more results than via browser, awesome
likes
you should consider that scraping followers/following/favorites is a bit more limited than just searching for tweets. Those are not intended to get all the awaited results

yes, I got the idea..
Do you think would  be possible to get get all the awaited results somehow I mean by scraping not "Paid API"?

I don't know, there limits with every tool (more or less)

Thank you


split the capacitypool chatflow to two (create and extend)

Now that we support starting chatflows with arguments, i think it makes much more sense to split capacitypool chatflow into
1- chatflow to create a capacity pool
2- chatflow to extend an existing capacitypool (by an action link in the capacity pools list)

create pool button only

after creating the pool, there an extend action

Verified

The create/extend pool button needs to be changed also in the dashboard

Verified
Branch: development
Commit: a4e3f07612731938ac67cdc855fb725e7a6b2505

I went to extend a pool after this update and wasn't able to find the new widget without referencing here. To make this more obvious for users, I'd propose placing the action column on the far left rather than the far right. Alternatively/additionally, add a way to access the extend chatflow from the pool details page.

@scottyeager A suggested fix is addressed here https://github.com/threefoldtech/js-sdk/issues/2588 to have the view more compact and hence no need for the scrolling in the first place


CHAMP Sphinx Docs

CHAMP Sphinx Docs initial commit.

Hey @mdalfaro readthedocs generates html files and publishes them, pulling directly from this repo.  So I think we just need the contents of the src directory, then the build dir can be added to .gitignore.

Submitting another.


pkg/types: Build a urls map from a string map

This adds a simple transformation function which is helpful when
manipulating the different etcd internal data representations.
If this is a patch you'd like upstream, let me know and I'm happy to rebase to git master if you'd like. Alternatively, I don't mind if you rebase this for me.

This semaphore failure looks like it's unrelated to my patch. If I'm mistaken and this needs fixing for some reason, please LMK.

@purpleidea Can you add a simple test for this new helper function?

On Mon, May 9, 2016 at 12:04 PM, Xiang Li<EMAIL_ADDRESS>wrote:

@purpleidea https://github.com/purpleidea Can you add a simple test for
this new helper function?

Yes absolutely. I'll do this shortly, sorry. I guess it's my bad that I
didn't do it off the bat, but I figured I would wait to see if you'd even
accept the function first. Tests coming...

@xiang90 Tests have been added, and I've rebased everything to current git master.

LGTM after fixing the comments.

@xiang90 The { & } aren't actually unnecessary, they contain each "subtest" in scope, so the variables can be reused. I started doing this in my tests so I can copy paste to make more without having to change := to = and so on... If after the reasoning you still don't like it, lmk and I'll change them.

I do not really like it. You can always separate them into two funcs, right?

@xiang90 New version pushed with split tests. Enjoy!

obligatory w00t.


Files in examples/pdf_store_and_query_with_chroma.rb don't exist

I was looking over these, and noticed:
https://github.com/andreibondarev/langchainrb/blob/eecd114a655e5f1b51ebcd9d39e26e72cfb918f6/examples/pdf_store_and_query_with_chroma.rb#L22-L24
These files don't exist. I'm not sure if the intent is to run them from where it's located or not. If it's not, then should at least include some comments to the effect of changing the file paths. I think it would be reasonable for them to live in the repository though.

@technicalpickles Think we should use the ones in spec/fixtures/loaders/ instead? They're not the "best" example files, maybe we should find ones that really showcase the capabilities of using this gem.


Artifact Generation broken when you have the Token Contract as a Dependency in Nargo.toml

Bug Report: Incorrect Contract Storage Layout Generated with Token Dependency
Aztec Version: v0.54.0
Repo for Replication: aztec-artifact-bug
Bug Description
When adding the token contract as a dependency in Nargo.toml, without actually importing or using it in the contract, the generated Contract Storage Layout reflects the storage of the token contract instead of the contract being worked on.
In the provided example, the simple counter contract should have the following storage layout in the generated TypeScript artifact:
public static get storage(): ContractStorageLayout<'counters'> {
  return {
    counters: {
      slot: new Fr(1n),
    },
  } as ContractStorageLayout<'counters'>;
}

However, when adding the token contract as a dependency in Nargo.toml, without importing it in the contract, the storage layout that is generated incorrectly maps to the storage slots of the token contract:
public static get storage(): ContractStorageLayout<'admin' | 'minters' | 'balances' | 'total_supply' | 'pending_shields' | 'public_balances' | 'symbol' | 'name' | 'decimals'> {
  return {
    admin: {
      slot: new Fr(1n),
    },
    minters: {
      slot: new Fr(2n),
    },
    balances: {
      slot: new Fr(3n),
    },
    total_supply: {
      slot: new Fr(4n),
    },
    pending_shields: {
      slot: new Fr(5n),
    },
    public_balances: {
      slot: new Fr(6n),
    },
    symbol: {
      slot: new Fr(7n),
    },
    name: {
      slot: new Fr(8n),
    },
    decimals: {
      slot: new Fr(9n),
    },
  } as ContractStorageLayout<'admin' | 'minters' | 'balances' | 'total_supply' | 'pending_shields' | 'public_balances' | 'symbol' | 'name' | 'decimals'>;
}

Steps to Reproduce
Clone the repo: aztec-artifact-bug.
Check the Nargo.toml file where the token contract is added as a dependency but not imported in the contract.
Compile the contract using:
aztec-nargo compile
aztec codegen -o src/artifacts target

Observe the incorrect storage layout in the generated TypeScript artifact.
Expected Behavior
The generated storage layout should match the contract being worked on (e.g., the simple counter contract) and not the token contract when it’s merely a dependency in Nargo.toml but not actually imported.

I confirm that the bug pertains after the macro migration. Updated the reproduction repo with the new version in this fork.
The reproduction was very easy to follow. Thanks again @Cheetah0x


AbemaTV-license

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

[X] I'm reporting that a supported site is broken
[X] I've verified that I'm running yt-dlp version 2023.03.04 (update instructions) or later (specify commit)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[X] I've read about sharing account credentials and I'm willing to share it if required

Region
Japan
Provide a description that is worded well enough to be understood
When I try to download a video from AbemaTV, an error occurs.
I have added the -u and -p parameters as this video must be viewed with a premium account, I have run it using cookies and the situation is the same.
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[ ] If using API, add 'verbose': True to YoutubeDL params instead
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
[debug] Command-line config: ['--verbose', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://abema.tv/video/episode/19-149_s1_p4']
[debug] Encodings: locale cp932, fs utf-8, pref cp932, out cp932 (No VT), error cp932 (No VT), screen cp932 (No VT)
[debug] yt-dlp version<EMAIL_ADDRESS>[392389b7d] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-7-6.1.7601-SP1 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 5.1-full_build-www.gyan.dev (setts), ffprobe 5.1-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Loading<EMAIL_ADDRESS>from cache
[AbemaTV] Fetching media token
[debug] Loading<EMAIL_ADDRESS>from cache
[debug] [AbemaTV] Skipping logging in
[AbemaTV] Extracting URL: https://abema.tv/video/episode/19-149_s1_p4
[AbemaTV] 19-149_s1_p4: Downloading webpage
[AbemaTV] 19-149_s1_p4: Checking playability
WARNING: [AbemaTV] This is a premium-only stream
[AbemaTV] 19-149_s1_p4: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 19-149_s1_p4: Downloading 1 format(s): 5300
[debug] Invoking hlsnative downloader on "https://vod-abematv.akamaized.net/program/19-149_s1_p4/1080/playlist.m3u8?aver=1"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 240
[download] Destination: #04 まひろとあたらしい友達 [19-149_s1_p4].mp4
[debug] File locking is not supported. Proceeding without locking
[download] #04 まひろとあたらしい友達 [19-149_s1_p4].mp4.part-Frag1 has already been downloaded

[download]   0.4% of ~ 774.84MiB at  807.14MiB/s ETA Unknown (frag 1/240)ERROR: unable to download video data: <urlopen error unknown url type: abematv-license>
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3247, in process_info
  File "yt_dlp\YoutubeDL.py", line 2970, in dl
  File "yt_dlp\downloader\common.py", line 444, in download
  File "yt_dlp\downloader\hls.py", line 365, in real_download
  File "yt_dlp\downloader\fragment.py", line 523, in download_and_append_fragments
  File "yt_dlp\downloader\fragment.py", line 364, in decrypt_fragment
  File "yt_dlp\downloader\fragment.py", line 353, in _get_key
  File "yt_dlp\YoutubeDL.py", line 3742, in urlopen
  File "urllib\request.py", line 525, in open
  File "urllib\request.py", line 547, in _open
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 1425, in unknown_open
urllib.error.URLError: <urlopen error unknown url type: abematv-license>

cc @Lesmiscore

@pukkandan I suppose it fucked up something in protocol handling? since the error tells that the protocol is not known
<urlopen error unknown url type: abematv-license>

I'll take a look anyway

PS: At 12:16(UTC), I ran episode 3 (https://abema.tv/video/episode/19-149_s1_p3) of the same title with the exact same command and the download was successful. However, now episode 3 also has an error. It is also a "urlopen error".
And also "urlopen error" occurs for episode 1 (https://abema.tv/video/episode/19-149_s1_p1), which can be viewed without a premium account.
Good luck.

】 [174-27_s4_p501].mp4
[download] 100% of   14.96MiB in 00:00:16 at 956.78KiB/s
[FixupM3u8] Fixing MPEG-TS in MP4 container of "PV【2023⧸1⧸5より毎週木曜23_00〜「深章 厄災篇」の地上波先行・独占先行放送が決定！】 [174-27_s4_p501].mp4"

Can you please try with the nightly builds here? https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest

Ah, I have found.
Using -u or -p fails to download...
First try
[debug] Command-line config: ['-vU', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://abema.tv/video/episode/174-27_s4_p501']
[debug] Encodings: locale cp932, fs utf-8, pref cp932, out cp932 (No VT), error cp932 (No VT), screen cp932 (No VT)
[debug] yt-dlp version<EMAIL_ADDRESS>[607510b9f] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-7-6.1.7601-SP1 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 5.1-full_build-www.gyan.dev (setts), ffprobe 5.1-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1788 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 1c92b3a04c54b86ad615ea89a6dd80f3321e10af69cb28c8a914bb12864fe5fa
yt-dlp is up to date<EMAIL_ADDRESS>[debug] Loading<EMAIL_ADDRESS>from cache
[AbemaTV] Fetching media token
[debug] Loading<EMAIL_ADDRESS>from cache
[debug] [AbemaTV] Skipping logging in
[AbemaTV] Extracting URL: https://abema.tv/video/episode/174-27_s4_p501
[AbemaTV] 174-27_s4_p501: Downloading webpage
[AbemaTV] 174-27_s4_p501: Checking playability
[AbemaTV] 174-27_s4_p501: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 174-27_s4_p501: Downloading 1 format(s): 5300
[debug] Invoking hlsnative downloader on "https://vod-abematv.akamaized.net/program/174-27_s4_p501/1080/playlist.m3u8?aver=1"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 9
[download] Destination: PV【202315より毎週木曜23_00～「深章 厄災篇」の地上波先行・独占先行放送が決定！】 [174-27_s4_p501].mp4
[debug] File locking is not supported. Proceeding without locking

[download]   0.0% of ~  35.08MiB at   24.39KiB/s ETA 24:32 (frag 0/9)
[download]  11.1% of ~  35.08MiB at   19.89MiB/s ETA 00:01 (frag 1/9)
ERROR: unable to download video data: <urlopen error unknown url type: abematv-license>
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3247, in process_info
  File "yt_dlp\YoutubeDL.py", line 2970, in dl
  File "yt_dlp\downloader\common.py", line 444, in download
  File "yt_dlp\downloader\hls.py", line 365, in real_download
  File "yt_dlp\downloader\fragment.py", line 523, in download_and_append_fragments
  File "yt_dlp\downloader\fragment.py", line 364, in decrypt_fragment
  File "yt_dlp\downloader\fragment.py", line 353, in _get_key
  File "yt_dlp\YoutubeDL.py", line 3743, in urlopen
  File "urllib\request.py", line 525, in open
  File "urllib\request.py", line 547, in _open
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 1425, in unknown_open
urllib.error.URLError: <urlopen error unknown url type: abematv-license>

Second try without -u and -p
[debug] Command-line config: ['-vU', 'https://abema.tv/video/episode/174-27_s4_p501']
[debug] Encodings: locale cp932, fs utf-8, pref cp932, out cp932 (No VT), error cp932 (No VT), screen cp932 (No VT)
[debug] yt-dlp version<EMAIL_ADDRESS>[607510b9f] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-7-6.1.7601-SP1 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 5.1-full_build-www.gyan.dev (setts), ffprobe 5.1-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1788 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 1c92b3a04c54b86ad615ea89a6dd80f3321e10af69cb28c8a914bb12864fe5fa
yt-dlp is up to date<EMAIL_ADDRESS>[AbemaTV] Extracting URL: https://abema.tv/video/episode/174-27_s4_p501
[AbemaTV] Authorizing
[AbemaTV] 174-27_s4_p501: Downloading webpage
[AbemaTV] 174-27_s4_p501: Checking playability
[AbemaTV] 174-27_s4_p501: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 174-27_s4_p501: Downloading 1 format(s): 5300
[debug] Invoking hlsnative downloader on "https://vod-abematv.akamaized.net/program/174-27_s4_p501/1080/playlist.m3u8?aver=1"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 9
[download] Destination: PV【202315より毎週木曜23_00～「深章 厄災篇」の地上波先行・独占先行放送が決定！】 [174-27_s4_p501].mp4
[debug] File locking is not supported. Proceeding without locking

[download]   0.0% of ~  35.08MiB at   26.32KiB/s ETA 22:45 (frag 0/9)
[AbemaTV] Fetching media token
[AbemaTV] Requesting playback license
[download] 100% of   14.96MiB in 00:00:01 at 13.06MiB/s
[debug] ffprobe command line: ffprobe -hide_banner -show_format -show_streams -print_format json "file:PV【202315より毎週木曜23_00～「深章 厄災篇」の地上波先行・独占先行放送が決定！】 [174-27_s4_p501].mp4"
[FixupM3u8] Fixing MPEG-TS in MP4 container of "PV【202315より毎週木曜23_00～「深章 厄災篇」の地上波先行・独占先行放送が決定！】 [174-27_s4_p501].mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:PV【202315より毎週木曜23_00～「深章 厄災篇」の地上波先行・独占先行放送が決定！】 [174-27_s4_p501].mp4" -map 0 -dn -ignore_unknown -c copy -f mp4 "-bsf:a" aac_adtstoasc -movflags "+faststart" "file:PV【202315より毎週木曜23_00～「深章 厄災篇」の地上波先行・独占先行放送が決定！】 [174-27_s4_p501].temp.mp4"

Unbelievable, but using the 2022.11.11 version I was able to download it without any problems...
I think, maybe the specifications have changed between the newer and older versions.

I could download premium videos a 30mins ago, then suddenly I can't download any, even same premium video.

Z:\yl-dlp>yt-dlp -r 1080p -u<EMAIL_ADDRESS>-p xxxxxxxx https://abema.tv/video/episode/26-111_s0_p1
[AbemaTV] Fetching media token
[AbemaTV] Extracting URL: https://abema.tv/video/episode/26-111_s0_p1
[AbemaTV] 26-111_s0_p1: Downloading webpage
[AbemaTV] 26-111_s0_p1: Checking playability
[AbemaTV] 26-111_s0_p1: Downloading m3u8 information
[info] 26-111_s0_p1: Downloading 1 format(s): 5300
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 854
[download] Destination: 青春ブタ野郎はゆめみる少女の夢を見ない [26-111_s0_p1].mp4
[download] 青春ブタ野郎はゆめみる少女の夢を見ない [26-111_s0_p1].mp4.part-Frag1 has already been downloaded
[download]   0.1% of ~ 162.31MiB at    6.01MiB/s ETA Unknown (frag 1/854)ERROR: unable to download video data:

Z:\yl-dlp>yt-dlp -vU -u<EMAIL_ADDRESS>-p xxxxxxxxxx https://abema.tv/video/episode/26-111_s0_p1s0_p1
[debug] Command-line config: ['-vU', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://abema.tv/video/episode/26-111_s0_p1s0_p1']
[debug] Encodings: locale cp932, fs utf-8, pref cp932, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[392389b7d] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-110989-gb92af7b64e-20230604 (setts), ffprobe N-110989-gb92af7b64e-20230604
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 5590c57bd0433ed239a2deaaf92e2ad6f37fe50f53664c821575cafe106a9421
yt-dlp is up to date<EMAIL_ADDRESS>[debug] Loading<EMAIL_ADDRESS>from cache
[AbemaTV] Fetching media token
[debug] Loading<EMAIL_ADDRESS>from cache
[debug] [AbemaTV] Skipping logging in
[AbemaTV] Extracting URL: https://abema.tv/video/episode/26-111_s0_p1s0_p1
[AbemaTV] 26-111_s0_p1s0_p1: Downloading webpage
ERROR: [AbemaTV] 26-111_s0_p1s0_p1: Unable to download webpage: HTTP Error 404: Not Found (caused by ); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp\extractor\common.py", line 694, in extract
  File "yt_dlp\extractor\abematv.py", line 349, in _real_extract
  File "yt_dlp\extractor\common.py", line 1097, in _download_webpage
  File "yt_dlp\extractor\common.py", line 1048, in download_content
  File "yt_dlp\extractor\common.py", line 882, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 839, in _request_webpage
  File "yt_dlp\extractor\common.py", line 821, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3742, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 640, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 649, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found

I could download premium videos a 30mins ago, then suddenly I can't download any, even same premium video.
`
Z:\yl-dlp>yt-dlp -r 1080p -u<EMAIL_ADDRESS>-p xxxxxxxx https://abema.tv/video/episode/26-111_s0_p1
[AbemaTV] Fetching media token
[AbemaTV] Extracting URL: https://abema.tv/video/episode/26-111_s0_p1
[AbemaTV] 26-111_s0_p1: Downloading webpage
[AbemaTV] 26-111_s0_p1: Checking playability
[AbemaTV] 26-111_s0_p1: Downloading m3u8 information
[info] 26-111_s0_p1: Downloading 1 format(s): 5300
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 854
[download] Destination: 青春ブタ野郎はゆめみる少女の夢を見ない [26-111_s0_p1].mp4
[download] 青春ブタ野郎はゆめみる少女の夢を見ない [26-111_s0_p1].mp4.part-Frag1 has already been downloaded
[download]   0.1% of ~ 162.31MiB at    6.01MiB/s ETA Unknown (frag 1/854)ERROR: unable to download video data:

Z:\yl-dlp>yt-dlp -vU -u<EMAIL_ADDRESS>-p xxxxxxxxxx https://abema.tv/video/episode/26-111_s0_p1s0_p1
[debug] Command-line config: ['-vU', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://abema.tv/video/episode/26-111_s0_p1s0_p1']
[debug] Encodings: locale cp932, fs utf-8, pref cp932, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[392389b7d] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-110989-gb92af7b64e-20230604 (setts), ffprobe N-110989-gb92af7b64e-20230604
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 5590c57bd0433ed239a2deaaf92e2ad6f37fe50f53664c821575cafe106a9421
yt-dlp is up to date<EMAIL_ADDRESS>[debug] Loading<EMAIL_ADDRESS>from cache
[AbemaTV] Fetching media token
[debug] Loading<EMAIL_ADDRESS>from cache
[debug] [AbemaTV] Skipping logging in
[AbemaTV] Extracting URL: https://abema.tv/video/episode/26-111_s0_p1s0_p1
[AbemaTV] 26-111_s0_p1s0_p1: Downloading webpage
ERROR: [AbemaTV] 26-111_s0_p1s0_p1: Unable to download webpage: HTTP Error 404: Not Found (caused by ); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp\extractor\common.py", line 694, in extract
  File "yt_dlp\extractor\abematv.py", line 349, in _real_extract
  File "yt_dlp\extractor\common.py", line 1097, in _download_webpage
  File "yt_dlp\extractor\common.py", line 1048, in download_content
  File "yt_dlp\extractor\common.py", line 882, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 839, in _request_webpage
  File "yt_dlp\extractor\common.py", line 821, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3742, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 640, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 649, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found
`

I could download premium videos a 30mins ago, then suddenly I can't download any, even same premium video.
Z:\yl-dlp>yt-dlp -u<EMAIL_ADDRESS>-p xxxxxxxx https://abema.tv/video/episode/26-111_s0_p1 [AbemaTV] Fetching media token [AbemaTV] Extracting URL: https://abema.tv/video/episode/26-111_s0_p1 [AbemaTV] 26-111_s0_p1: Downloading webpage [AbemaTV] 26-111_s0_p1: Checking playability [AbemaTV] 26-111_s0_p1: Downloading m3u8 information [info] 26-111_s0_p1: Downloading 1 format(s): 5300 [hlsnative] Downloading m3u8 manifest [hlsnative] Total fragments: 854 [download] Destination: 青春ブタ野郎はゆめみる少女の夢を見ない [26-111_s0_p1].mp4 [download] 青春ブタ野郎はゆめみる少女の夢を見ない [26-111_s0_p1].mp4.part-Frag1 has already been downloaded [download]   0.1% of ~ 162.31MiB at    6.01MiB/s ETA Unknown (frag 1/854)ERROR: unable to download video data: <urlopen error unknown url type: abematv-license>
Z:\yl-dlp>yt-dlp -vU -u<EMAIL_ADDRESS>-p xxxxxxxxxx https://abema.tv/video/episode/26-111_s0_p1s0_p1 [debug] Command-line config: ['-vU', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://abema.tv/video/episode/26-111_s0_p1s0_p1'] [debug] Encodings: locale cp932, fs utf-8, pref cp932, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version<EMAIL_ADDRESS>[392389b7d] (win_exe) [debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021) [debug] exe versions: ffmpeg N-110989-gb92af7b64e-20230604 (setts), ffprobe N-110989-gb92af7b64e-20230604 [debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4 [debug] Proxy map: {} [debug] Loaded 1786 extractors [debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 5590c57bd0433ed239a2deaaf92e2ad6f37fe50f53664c821575cafe106a9421 yt-dlp is up to date<EMAIL_ADDRESS>[debug] Loading<EMAIL_ADDRESS>from cache [AbemaTV] Fetching media token [debug] Loading<EMAIL_ADDRESS>from cache [debug] [AbemaTV] Skipping logging in [AbemaTV] Extracting URL: https://abema.tv/video/episode/26-111_s0_p1s0_p1 [AbemaTV] 26-111_s0_p1s0_p1: Downloading webpage ERROR: [AbemaTV] 26-111_s0_p1s0_p1: Unable to download webpage: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U   File "yt_dlp\extractor\common.py", line 694, in extract   File "yt_dlp\extractor\abematv.py", line 349, in _real_extract   File "yt_dlp\extractor\common.py", line 1097, in _download_webpage   File "yt_dlp\extractor\common.py", line 1048, in download_content   File "yt_dlp\extractor\common.py", line 882, in _download_webpage_handle   File "yt_dlp\extractor\common.py", line 839, in _request_webpage   File "yt_dlp\extractor\common.py", line 821, in _request_webpage   File "yt_dlp\YoutubeDL.py", line 3742, in urlopen   File "urllib\request.py", line 531, in open   File "urllib\request.py", line 640, in http_response   File "urllib\request.py", line 569, in error   File "urllib\request.py", line 502, in _call_chain   File "urllib\request.py", line 649, in http_error_default urllib.error.HTTPError: HTTP Error 404: Not Found

I could download premium videos a 30mins ago, then suddenly I can't download any, even same premium video.
`
Z:\yl-dlp>yt-dlp -u<EMAIL_ADDRESS>-p xxxxxxxx https://abema.tv/video/episode/26-111_s0_p1
[AbemaTV] Fetching media token
[AbemaTV] Extracting URL: https://abema.tv/video/episode/26-111_s0_p1
[AbemaTV] 26-111_s0_p1: Downloading webpage
[AbemaTV] 26-111_s0_p1: Checking playability
[AbemaTV] 26-111_s0_p1: Downloading m3u8 information
[info] 26-111_s0_p1: Downloading 1 format(s): 5300
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 854
[download] Destination: 青春ブタ野郎はゆめみる少女の夢を見ない [26-111_s0_p1].mp4
[download] 青春ブタ野郎はゆめみる少女の夢を見ない [26-111_s0_p1].mp4.part-Frag1 has already been downloaded
[download]   0.1% of ~ 162.31MiB at    6.01MiB/s ETA Unknown (frag 1/854)ERROR: unable to download video data:

Z:\yl-dlp>yt-dlp -vU -u<EMAIL_ADDRESS>-p xxxxxxxxxx https://abema.tv/video/episode/26-111_s0_p1s0_p1
[debug] Command-line config: ['-vU', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://abema.tv/video/episode/26-111_s0_p1s0_p1']
[debug] Encodings: locale cp932, fs utf-8, pref cp932, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[392389b7d] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-110989-gb92af7b64e-20230604 (setts), ffprobe N-110989-gb92af7b64e-20230604
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: 5590c57bd0433ed239a2deaaf92e2ad6f37fe50f53664c821575cafe106a9421
yt-dlp is up to date<EMAIL_ADDRESS>[debug] Loading<EMAIL_ADDRESS>from cache
[AbemaTV] Fetching media token
[debug] Loading<EMAIL_ADDRESS>from cache
[debug] [AbemaTV] Skipping logging in
[AbemaTV] Extracting URL: https://abema.tv/video/episode/26-111_s0_p1s0_p1
[AbemaTV] 26-111_s0_p1s0_p1: Downloading webpage
ERROR: [AbemaTV] 26-111_s0_p1s0_p1: Unable to download webpage: HTTP Error 404: Not Found (caused by ); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp\extractor\common.py", line 694, in extract
  File "yt_dlp\extractor\abematv.py", line 349, in _real_extract
  File "yt_dlp\extractor\common.py", line 1097, in _download_webpage
  File "yt_dlp\extractor\common.py", line 1048, in download_content
  File "yt_dlp\extractor\common.py", line 882, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 839, in _request_webpage
  File "yt_dlp\extractor\common.py", line 821, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3742, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 640, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 649, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found`

The latest version has been working to download premium videos, but suddenly it gaves an error even thogh the video used to be downloaded. ( I guess same version of yt-dlp) Now I down grade to 2022.11.11 version, it works again.


Singularity testing

Task Description
Test

[ ] vbm preprocesser
[ ] vbm regression
[ ] decentralized mancova
Data can be found in each computation repo

VBM preprocessor
How should the computation step be configured?

There are 2 issues here:

The download failed for some reason
It appears that the file exists and therefor passes the isSingularityImageLatest check but the image is bad

rm -rf the image gets permission denied

It looks like permission is denied to add the files when downloading

Adding the --fix-perms option so singularity build was a suggested solution in the error text.
That seemed to potentially fix the problem but now there's an error saying 'not enough space on device'
I'll clear some space to see if it works.
There is a warning in the error text that says: WARNING: The --fix-perms option modifies the filesystem permissions on the resulting container.
Let's revisit to make sure it isn't a security issue.

We may need more space on this volume

Increased size of storage on the EC2 instance from 30GB to 60GB. No longer running int device space limits.

Running VBM pre

It looks like the docker image for the remote isn't pulled

Computation is running

Is this the expected result from VBM pre?

@rssk which of these computations is "VBM regression"?

Files are showing up in the wrong place

VBM preprocessor is taking a while. Moving on to VBM regression to see if that completes. Using this configuration:

It isn't necessarily true that these runs are hanging because we're using Singularity. It's likely there is some other issue.

https://github.com/trendscenter/coinstac/issues/1693

Modify runscript and not startscript

Echo successfully logged. It looks like a json object is being passed into the exec command. Are these the expected arguments?

Are these the correct args?

After feeding the correct compspecVersion to serviceFunctionGenerator, the code goes down compspecVersion 2 switch case. it then encounters this error

Are these the commands that need to be executed by the exec line in the runscript?

[ ] ssr regression, compspec type 2
https://github.com/trendscenter/coinstac-regression-fsl
[ ] vbm preprocessor, compspec type 1
https://github.com/trendscenter/Coinstac_VBM_computation
[ ] vbm regression, compspec type 2
https://github.com/trendscenter/coinstac-regression-vbm
[ ] decentralized mancova, compspec type 1
https://github.com/trendscenter/coinstac-mancova/tree/master/coinstac_mancova

We must not be running from the .sif

ws error not bubbling up

The python server inside the singularity container for compspecVersion 2 needs to know what port to listen on for ws connections.

Investigate if a non zero exit code process triggers singularity instance to propagate or other show the error

The above comment is referring to the entry command script. For example:
    "command": [
      "python",
      "\/computation\/scripts\/local.py"
    ],

Got vbm working, had to fix the passed in env to singularity's start, they need to be comma separated  --env B=1,C=1


[GHSA-q62h-jw38-24vh] Uncaught Exception in zip4j

Updates

Affected products

Comments
According to Patch, this vulnerability was introduced from 2.0.

👋 Hi @SunBK201, I'm unable to find any information in the patch that says net.lingala.zip4j:zip4j became vulnerable in version 2.0. In addition, the maintainer of https://github.com/srikanth-lingala/zip4j previously submitted a community contribution (https://github.com/github/advisory-database/pull/187) when a fixed version became available, and the maintainer made no changes to the lower bound of the vulnerable version range. Do you have any other information to support adding 2.0 as the minimum vulnerable version?


ci: fix syntax error in dependabot.yml

Description:

Testing done:

Affected area:

Functional Area

New Functionality
[ ]

CI System
[ ]

CLI Tool
[ ]

Certificate Management
[ ]

Control Plane
[ ]

Demo
[ ]

Documentation
[ ]

Egress
[ ]

Ingress
[ ]

Install
[ ]

Networking
[ ]

Observability
[ ]

Performance
[ ]

SMI Policy
[ ]

Security
[ ]

Sidecar Injection
[ ]

Tests
[ ]

Upgrade
[ ]

Other
[ ]

Please answer the following questions with yes/no.

Does this change contain code from or inspired by another project?

Did you notify the maintainers and provide attribution?

Is this a breaking change?

Has documentation corresponding to this change been updated in the fsm-docs repo (if applicable)?

Backport failed for release/v1.4, because it was unable to cherry-pick the commit(s).
Please cherry-pick the changes locally and resolve any conflicts.
git fetch origin release/v1.4
git worktree add -d .worktree/backport-520-to-release/v1.4 origin/release/v1.4
cd .worktree/backport-520-to-release/v1.4
git switch --create backport-520-to-release/v1.4
git cherry-pick -x f9f930edc1b1861ad37f3ed9734a1f197856cc85


With only broken

Hi @JorgenEvens, looks like we've broken your with only addition from https://github.com/twigjs/twig.js/pull/497 :(
Could you take a look and see if you can fix?

@dave-irvine sure thing!


Unsupported type: Energy

{"Battery":255,"RSSI":12,"dtype":"P1 Smart Meter","id":"1","idx":123,"name":"Stroomverbruik","nvalue":0,"stype":"Energy","svalue1":"10606076","svalue2":"5963115","svalue3":"17","svalue4":"13","svalue5":"3430","svalue6":"0","unit":1}
JSON result:
{
"ActTime" :<PHONE_NUMBER>,
"ServerTime" : "2017-01-28 17:46:58",
"Sunrise" : "08:19",
"Sunset" : "17:20",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"Counter" : "16569.889",
"CounterDeliv" : "0.030",
"CounterDelivToday" : "0.000 kWh",
"CounterToday" : "10.240 kWh",
"CustomImage" : 0,
"Data" : "10606774;5963115;17;13;3710;0",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 19,
"HardwareName" : "P1 smartmeter",
"HardwareType" : "P1 Smart Meter USB",
"HardwareTypeVal" : 4,
"HaveTimeout" : false,
"ID" : "1",
"LastUpdate" : "2017-01-28 17:46:54",
"Name" : "Stroomverbruik",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "Energy",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "P1 Smart Meter",
"TypeImg" : "counter",
"Unit" : 1,
"Usage" : "3710 Watt",
"UsageDeliv" : "0 Watt",
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "123"
}
],
"status" : "OK",
"title" : "Devices"
}

OK so svalue1 to 6 stand for: USAGE1;USAGE2;RETURN1;RETURN2;CONS;PROD
(here: 10606774;5963115;17;13;3710;0)
From Domoticz wiki:
USAGE1= energy usage meter tariff 1
USAGE2= energy usage meter tariff 2
RETURN1= energy return meter tariff 1
RETURN2= energy return meter tariff 2
CONS= actual usage power (Watt)
PROD= actual return power (Watt)
@pservais what information should be displayed by the widget? cons and prod? The energy widget currently looks like this: https://github.com/t0mg/reacticz/wiki/Supported-devices#energy

If it's possible 2 widgets would be great. 1 for consumed energy and 1 for produced energy, I think that both in 1 widget is too many data for a widget. The current energy widget is fine, display Cons and Prod, but only the total of usage1 and usage2 should be displayed, same for return1 and 2

2 widgets won't be possible unfortunately, but I agree there is too much data here. Reacticz is designed for mobile devices and small screens, so widgets must be small. That's why I'd rather be scarce and only show partial data here. So what should I focus on ? cons and prod ? the sums of usage and return ?
And don't worry, if you want to be exhaustive and show everything in Reacticz, you can still create a custom text widget :)

If a custom text widget is available (loud cheering!) then a widget with Cons and Prod is fine.
You are right, the widgets should stay small.
Isn't it possible to show more info when making the widget bigger, and hiding info when making the widget smaller :D ?

I've just added support for cons and prod data to the standard energy widget, I hope it'll work for you.
Since Reacticz is responsive there is no (simple) way to hide extra information based on the size of the widgets. Besides, I'm rather against the idea of penalizing small screens ;)
The TextWidget is already supported if you want to create some custom output with all the details of your P1 meter, you can give it a try :) In the future we might add customization options (such as icons) to the TextWidget.
Cheers,

Nice, thanks!
Hahaha, the expanding info was just a brainfart. Don't worry this is perfect as it is.
I can't seem to find the text widget. Where do i create one?

Just create a virtual device of type text in Domoticz. You should then be able to add it in reacticz.

Aha, thanks!


auto attach not working with node

Issue Type: Bug
Hi team,
auto attach is not working on node
VS Code version: Code 1.47.0 (d5e9aa0227e057a60c82568bf31c04730dc15dcd, 2020-07-09T08:01:54.115Z)
OS version: Darwin x64 18.7.0

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz (8 x 1400)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
2, 2, 2

Memory (System)
8.00GB (0.04GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (2)

Extension
Author (truncated)
Version

gitlens
eam
10.2.2

python
ms-
2020.6.91350

I have the same issue on Linux (Fedora 32 64bits), "autoAttachChildProcesses" on NodeJS  is not working since at least VSCode 1.46.1 but working on Windows 10.

Thanks for the issue! What problem are you seeing -- e.g. do you get attach info written to the terminal but it never attaches, or does it just never attach at all?
/needsMoreInfo

vscode v1.47.0 debugger autoattaching not working on windows 10 either

We're going to revert auto attach to the previous behavior in the upcoming recovery release on Thursday, see https://github.com/microsoft/vscode/issues/102057#issuecomment-657728467
/duplicate