text:
Oidc Access Token Provider

I have now implemented quite a few times OidcTokenAccessProvider, for example here.
Despite it being almost trivial in the end user codebase it turns out that is difficult to refactor the mechanism up to this repository.
More specifically the challenges are:

Access to an HttpClient (or RequestAdapter but I think there are a few gaps later on) - possibly we should be able to decide to use the same or a different one from the "normal" API calls
encode a form body is pretty straightforward with a bare HTTP client, not sure how that looks like with bare Kiota without the generated classes
decode a Json response
etc...

I'm here looking for guidance on how we can approach the problem.
I have attempted at first to add an initialize method to AccessTokenProvider and to AuthenticationProvider so that it can be eventually triggered by the RequestAdapter implementation.
I started having too many things to pull in and thought that it was not a great design ...

Thanks for starting the conversation here.
Have you considered standing a new package like we have azure identity today?
This way you could pull the require dependencies, and use a native http client.

Right, standing an external package's always viable, still I think that it doesn't, easily, enable all of the scenarios.
E.g.:
it's still going to be tricky to share the native client between the "standard" HTTP calls and the authentication layer.
In addition it might cause issues on the user's classpath, I love how Kiota separates the concerns and you end up with very minimal dependencies; providing an external library locks the user to specific core libraries or they are going to end up with multiple HTTP client, serialization libraries etc.

Sorry for the delay, I have not forgotten about this, but I wanted to try out a different approach to see how it plays out.
The consideration I have made is:

the AuthenticationProvider needs to be specific for an HTTP Client
most mature HTTP Client implementations already offer some way to deal with authentication

Hence we can directly leverage the specific HTTP Client, built-in, authentication implementation.
The biggest downside would be fragmentation in the ecosystem, but, if there are no alternatives other than having to re-write the authentication provider implementation for the different HTTP Client, I think, it's the most pragmatic option.
I have experimented with this approach and the Vert.X client, here you can see how it looks like from a user's perspective.
Thoughts?

Thanks for providing more context here.
I don't think I have a strong opinion for people using:

An implementation of AuthenticationProvider.
AnonymousProvider + some special configuration of their http client.

In my experience, while "easy" and already existing, authentication providers that are tied to the http client often lack features:

token caching (potentially needs to be distributed depending on which app we're talking about)
token challenges (when the service sends you back a 401 with www-authenticate header because your token has been invalidated, doesn't have the right permissions, something else changed like the geolocation of the user...)
are not portable between http clients by nature.
can't be generated with the client. (generating the auth setup is not something we've given up on, but OpenAPI needs to evolve if we're going to do that)

All those features can be provided by the underlying authentication library we'd be using to implement the different authentication scenarios (like a generic OIDC lib for java for example), or in a generic way through a proxy design pattern in kiota's abstractions.
But I agree that building authentication providers across languages is a big task, on the other hand, if we don't do it, it'll add friction to people using kiota clients to talk to their favorite API.
I think a first step would be to:

document the different providers we have across languages
document the middleware aspect
document the fact you can provide your own native client to the request adapter, with a set of configurations.
provide some conceptual documentation linking things together and outlining options for authentication.

From there we should see where customers demand takes us: do they want more "first party" authentication providers for additional scenarios (basic, API key, cookie, NTLM/kerberos, OIDC, certificate exchange, etc...), an eco-system of third party providers, the client to be somehow already generated with authentication setup for them, something else?
What do you think?

or in a generic way through a proxy design pattern in kiota's abstractions

Implementing token caching generically for all oauth providers would only be a matter of re-implementing AuthenticationProvider, while accepting an AuthenticationProvider as a constructor argument, as well as a couple of settings (how to build the cache key from the request information with things like path/query parameters/headers) . This implementation would then:

forward the call to the original implementation on the first call.
build the key based of the settings.
store the token in the cache (let's suppose in memory for that implementation).
on a subsequent request, build the key again, and try to get an entry from the cache with that key.
return the cached token instead of forwarding the call.

(there are a couple of additional aspects with www-authenticate headers, token valid periods, etc... but this is the gist of it).
I understand the challenge, in terms of fragmentation of the ecosystem. Getting the funding to build a bunch of authentication providers on our end will be challenging at best. This is why I wanted to rely on the community and partners to bridge the gaps here. But it we don't provide:

guidelines to API consumers on their options.
guidelines to contributors on how to contribute authentication providers.
a way for API consumers to discover those providers.

It's not going to happen. looping in @sebastienlevert for visibility

authors: andreaTP baywet

repo: microsoft/kiota-java


text:
Feat/paging

#1569

Looks like deltalink is missing as well.

@MIchaelMainer, what is deltalink? This was designed to mirror the autorest extension Autorest x-ms-pageable

@MIchaelMainer the delta link is a mechanism of sync, not paging. By definition when your application gets a delta link, it's done paging the current changes with the next link, and needs to persist it and come back with it later. I don't think this applies to the scope of these changes.

source: gharchive/pull-request

authors: baywet calebkiage

repo: microsoft/kiota

license: MIT

license_type: permissive

license_source: github-api


text:
For a type like "CompletionTriggerKind = 1 | 2 | 3", can servers assume they will never get another value?

There are a lot of types in the spec that are made up of constants, for example:
CompletionTriggerKind = 1 | 2 | 3

The spec says that this type will be passed when contextSupport is set to true. It's not clear whether in the future some clients may support an additional value (4) or not, and whether servers should be written to accommodate that.
This could mean the different between modelling this type as a number on the server (can be anything) or an enum that would only allow the specified values (in which case, an unknown value may result in a failure to deserialise the message).
Assuming it's possible there may be a 4 in future, I think the CompletionTriggerKind should be annotated in some way that it's value might not be 1 | 2 | 3.

These are the items I can see in the spec where the type looks to be fixed to the specified list:

CompletionTriggerKind
FailureHandlingKind
InsertTextFormat
MarkupKind
ResourceOperationKind

SymbolKind also has a restricted type, however it's explicitly handled by the client advertising which it supports (and in doing so, guarantees it will handle unknown values).
The other types all tend to use string or number in the classes that hold them, which indicates they accept any value. For now, I'm assuming it's not valid for a client (or server) to send values for the types listed above that are not listed in the spec (and that they will not be extended in future). I'm not sure that's intended though (for ex. SumbolKind seems like the sort of thing that

Your assumption is correct and not. No values should be passed around that are not in the spec unless explicitly stated. However these enums can have additional values in the future however this needs to be guarded by a capability to ensure that the other sides support them. An example is the SymbolKind which we extended. However a client needs to signal that to the server.
OK to close?

However these enums can have additional values in the future however this needs to be guarded by a capability to ensure that the other sides support them

My understanding is that was why some types were typed as num/string instead of the enum type. But now I'm confused. If I copied the definition of CompletionTriggerKind from the spec, and wrote this code:
type CompletionTriggerKind = 1 | 2 | 3;

export interface CompletionContext {
	triggerKind: CompletionTriggerKind;
}

let a: CompletionContext = null;

if (a.triggerKind === 1) {
	print("1");
} else if (a.triggerKind === 2) {
	print("2");
} else if (a.triggerKind === 3) {
	print("3");
} else {
	print(a.triggerKind); // a.triggerKind is never
}

The type of a.triggerKind at the end here is never, which makes it seem like this can't possibly happen. It seems like the definition of CompletionTriggerKind here is incorrect if it may be extended in future. If there is a chance that a client could send a 4 it seems dangerous to use this definition.
In that case, I think it would be better to remove the CompletionTriggerKind and type it as number in the CompletionContext.triggerKind property?

You are talking about coding against the API. I still see no problem typing it as 1 | 2 | 3 since it makes things more clear. Assuming we add another kind 4. If your client code doesn't set a capability that 4 is supported a server should not send for, so your code is still correct. If you opt in supporting 4 then of course you need to change the if / else cascade as well.

@dbaeumer I mean that the code above is probably not what server authors will write, because their type system may say that the else case is not possible. Writing it as 1 | 2 | 3 makes it really easy to write code that never handles values outside of that (since the type system says they're not possible) and therefore end up with servers that aren't very forwards-compatible.
In normal TypeScript code (ignoring LSP), probably you wouldn't type something as 1 | 2 | 3 if you knew that in future the code might get a 4 (before you've been able to deploy updated code).
It also makes it difficult when generating code to know which cases are really closed sets (eg. other values can immediately reject with INVALID_PARAMS during deserialisation) and which are not (though now I'm questioning whether anything at all is actually a closed set).

I see the point however if outside values are handled nicely by the server code like this can be written, which makes this even more clear IMO
if (....) {
} else if (...) {
} else {
   const outside = a.triggerKind;
   pint(outside);
}

Sure, but my concern was that it was easily to accidentally not handle it because the types say that it can't happen. If you write the code above and hover your mouse over triggerKind you see this:

It would be easy to assume this cannot happen and delete the else (the type says never after all). It doesn't seem crazy that you may convert the spec into another language which tells you this is unreachable code outright (I don't know if any do this, but it seems valid).
If another property was changed from string | number to string | number | boolean it would be considered a breaking change and would (presumably) be guarded by the client/server having to advertise that it supports the new boolean option in capabilities before they are sent. It seems like this is the same thing.
Eg. when 3 was added to CompletionTriggerKind there was nothing done to protect against servers that might have done this (which seems completely valid given that the spec specifically says the value is 1 | 2 and not number):
if (triggerKind == CompletionTriggerKind.Invoked) {
// Handle invoked
} else {
// Handle TriggerCharacter
}

and then clients send them a 3 and it behaves as a 2.
Anyway, I think you understand what I'm saying so if you think it's fine as-is, I won't keep banging on :) I'll change my code-gen not to assume unions of literal strings/numbers are that fixed set. I guess in theory every one of them could be extended in future.

It sounds like there will be capability flags guarding any extensions to value sets, so servers written with a fixed value set are fine to do so because they won't be opting into the capability with the extended values. Is the clarification tag for adding this explicitly to the spec?

The wat we currently go is not a flag be value but that the client announces its used values if we extend them

OK, not necessarily flags, but in

this needs to be guarded by a capability to ensure that the other sides support them.

Are you saying that extra values will not be used unless both sides indicate support for them? Which means that a server/client can just treat the set as fixed until it decides to support the extended set.

The client announces which value set it supports. The server is supposed to not use values outside the client set. This being said a client should protect itself against unknown properties if there is a meaningful default (for example I default an severity to error if its value is unknown in the VS Code client).

The reason why this behaves the way it currently does is that LSP is versioned using these capability flags and not version numbers. This is something we decided a long time ago and is nothing we can change now (and I still think it was the right approach since it allows clients and server gradually adopt new features).
I will close the issue since I don't see a way of changing this now. I also made an effort for the 3.16 spec to ensure the right property announcement in the initialize call.

source: gharchive/issue

authors: Aerijo DanTup dbaeumer

repo: microsoft/language-server-protocol


text:
Dataverse Low Code Plugins from Plugin samples always turn out to be failed

I was trying out your experimental feature, mainly using the samples give in the model driven accelerator. But they always end up failing without any way to troubleshoot what went wrong...add debugging capability to these plugins as well.

Hi Pavan,
You should see the error message that API throws in the developer tool. We have work item to show the error message on UI.
This sample example will work for account record which has a valid email field set and the SenderEmail should be a valid system user on the system.
We do have plans of improving debugging ability for low code plugins in near future.

Hi Srinivas, Thanks for your response, when you say " You should see the error message that API throws in the developer tool", do you mean Visual Studio?
Noted on your future plan, is there any timeline...for this to be in Preview...

authors: lasrivas pavanmanideep

repo: microsoft/lowcodeplugins


text:
Navigation view does not work with Arrow keys, hence inaccessible by keyboard (on specific screens)

Describe the bug

Navigation Issue: Navigation view control is expected to navigate using the up and down arrow keys, but it does not happen. The weird thing is that when I try to do the same on the monitor attached to my laptop it works fine but just not on my laptop screen. Seems like it has something to do with the hardware configuration of my laptop screen as it works fine on the attached monitor.
Narrator Issue: The narrator is expected to say General selected 1 of 9... and similar things for all the items but it only does so on my monitor and not on my laptop screen. On my laptop screen it does so for the first tab but for the others it just reads out the first item in content of that page.

Steps to reproduce the bug

Steps to reproduce the behavior:

Try to tab into a navigation view control

Expected behavior

As you can see in the gif. The smaller recording is on my monitor screen and the arrow based navigation works as expected. The larger one is on my laptop screen and it does not work. The monitor is just connected to my laptop by a HDMI cable.
Screenshots

Version Info

NuGet package version:

Microsoft.UI.Xaml 2.5.0-prerelease.200708003

Windows app type:

UWP
Win32

Yes

Windows 10 version
Saw the problem?

Insider Build (xxxxx)

May 2020 Update (19041)

November 2019 Update (18363)

May 2019 Update (18362)
Yes

October 2018 Update (17763)

April 2018 Update (17134)

Fall Creators Update (16299)

Creators Update (15063)

Device form factor
Saw the problem?

Desktop
Yes

Xbox

Surface Hub

IoT

Additional context

Linked issue in the powertoys repo - https://github.com/microsoft/PowerToys/issues/6089

@ranjeshj There is also an issue (I'm not sure if it is only specific to xaml islands) where we navigate only to the first element of the navigation view on pressing tab and not the selected item.
Ideally we would like to go to the Keyboard manager item, but we always go to general.

There is also an issue (I'm not sure if it is only specific to xaml islands) where we navigate only to the first element of the navigation view on pressing tab and not the selected item.

Is this really an issue though? The selected NavigationViewItem can be reached with the arrow keys. The documentation also doesn't appear to state this behavior.
Should the NavigationView behave like the RadioButtons control and set focus to the selected item when focus reaches the menu items lists? @YuliKl

@Felix-Dev Unfortunately, the issue still persists with 2.5.0-prerelease.200812001.

@alekhyareddy28 Hmmm, I just tested 2.5.0-prerelease.200812001 again and it works fine for me:

PowerToys is using Xaml Islands so if it works fine for me in an UWP app, yet you are seeing that using in PowerToys with the same WinUI versions then it might be an Xaml Island-related issue? Though that sounds a bit strange to me in this context 🤔

@Felix-Dev to clarify, the tab navigation now goes to the selected item. That issue is fixed. I can confirm that with xaml islands too. However, the main arrow navigation issue when the scale is set to 125% still persists. I am unable to navigate using arrow keys. Thanks.

Ah, I see. I thought you were talking about the [focus not being set to the selected item] issue. Good to hear that's working for you.
Looking at your initially reported issue (arrow navigation not working with 125% scale display scale) it seems to be a "needs-winui-3" issue, in other words, WinUI 2.x versions won't be able to ship fix a fix for it (the code to fix currently still resides excluisvely in the OS and not in the WinUI 2 repo). I don't know when a fix for this issue would land in WinUI 3 but the community might be able to help out the team here once WinUI 3 has been open-sourced (in case the team has no immediately available resources to tackle this specific issue).

Sounds good. Thanks for the clarification.

Hi everyone, just to flag this, we got flagged by accessibility on this bug and we pointed back at this bug.

authors: Felix-Dev alekhyareddy28 crutkas

repo: microsoft/microsoft-ui-xaml


text:
Navigation footer showing arrow keys (up and down buttons)

Describe the bug
App Type: WinUI Desktop App
I am using Navigation Footer items and even with one item in the list, App is displaying weird up and down arrow keys that are clickable. I disabled the regular settings page and using my own page as settings under the footer items.
Sample code:
    <muxc:NavigationView x:Name="navigationView" SelectionChanged="NavigationView_SelectionChanged"
		IsSettingsVisible="False" IsBackButtonVisible="Collapsed"
		BorderBrush="{ThemeResource TextControlBorderBrush}" BorderThickness="1" PaneDisplayMode="Auto" OpenPaneLength="250"
		Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
		<muxc:NavigationView.MenuItems>
			<muxc:NavigationViewItem x:Name="Files" Content="Files" >
				<muxc:NavigationViewItem.Icon>
					<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" />
				</muxc:NavigationViewItem.Icon>
			</muxc:NavigationViewItem>
		</muxc:NavigationView.MenuItems>
		<muxc:NavigationView.FooterMenuItems>
			<muxc:NavigationViewItem x:Name="Settings" Content="Settings" Icon="Setting" IsSelected="true"/>
		</muxc:NavigationView.FooterMenuItems>

		<muxc:NavigationView.Content>
			<Frame x:Name="contentFrame"/>
		</muxc:NavigationView.Content>
    </muxc:NavigationView>

Expected behavior
Arrow keys should be visible only if there are items that are not visible on the UI based on the window height.
Screenshots

Version Info
WindowsAppSDK NuGet package version: 0.8.1
OS version(s): All

Should be fixed by the 2.6 port of winui2.

authors: StephenLPeters abhi-msft


text:
How to build and deploy an unpackaged app made using C# "WinUI 3 in Desktop", so that I can distribute it to others?

I recently made two unpackaged WinUI 3 desktop applications (using the Blank App, Packaged (WinUI 3 in desktop) project), and made an exe file by using the Publish option that is inside the right-click menu of the main project node.
The application ran just fine on my machine. Actually, I already installed the Windows App SDK runtime and MSIX packages, as mentioned in Create a WinUI 3 app that it is required to run the app. So, it worked fine on my machine.
Then I got on another PC, and tried to run the application, but it didn't run. I then installed the Windows App SDK runtime on that machine also, and then tried to run it, but it still didn't work.
I read many docs, and I am exhausted as hell. But still I didn't find any solution that worked. I just cannot make it work.
Can you guys tell me the steps to properly deploy my app, so that I can distribute it to users. And also, please mention the runtimes/things that the user has to install to make the app work.... Please try to give fewer external links to official docs, as I have have (I forgot grammar) enough of those. I said fewer, you can still mention them, as I must have missed many things. In short, JUST GIVE ME A SOLUTION!

I have had similar issues as you trying to get unpacked WinUI 3 apps to run. Error messages if any are not helpful. It seems as many others have problems too. I think currently the best approach is to use the MSIX packaged apps approach. That has been trouble free for me so far in my early experiments. Yes that means signing the code with certificates but going forward that is the way to go.

You mean that I should distribute the .msixbundle of my application, and users have to manually install the certificates, to install it?

Yes, that would mean you distribute an xxx.msix file with all dependencies included. If you use a certificate from a recognized authority then there is no need for the users to manually install the certificates. Otherwise as you say they would need to install them manually. Still just for the initial install I believe.
If your users have access to a shared folder then the App Installer method seems workable to distribute and update msix apps.
Please be aware the this is something I have just read and not tried myself yet.
https://docs.microsoft.com/en-us/windows/msix/app-installer/app-installer-file-overview

Can't I just create a Console Application, named as Setup, which the user just has to click, and it will install the certificate and sideload the application too. I am not asking for the steps; I am just asking 'Can't I'.

I don't know but you might want to ask on the WinUI Community Call later today. In earlier calls they have been quite busy answering live questions.
https://github.com/microsoft/microsoft-ui-xaml/issues/6593

@Realinspirer
I had a similar experience.
Please check this part. I am distributing the program without using MSIX this way.
Case 1
If an error similar to the Windows Event Log occurs, it is considered a bug in the publish function.
Application: App1.exe
CoreCLR Version: 6.0.121.56705
.NET Version: 6.0.1
Description: The application requested process termination through Environment.FailFast.
Message: Dll was not found.
Stack:
   at System.Environment.FailFast(System.String)
   at Microsoft.Windows.ApplicationModel.DynamicDependency.BootstrapCS.AutoInitialize.AccessWindowsAppSDK()
   at <Module>..cctor()

Application: App1.exe
CoreCLR Version: 6.0.121.56705
.NET Version: 6.0.1
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: Unable to find an entry point named 'MddBootstrapInitialize' in DLL 'Microsoft.WindowsAppRuntime.Bootstrap.dll'.
Stack:
   at System.Environment.FailFast(System.String)
   at Microsoft.Windows.ApplicationModel.DynamicDependency.BootstrapCS.AutoInitialize.AccessWindowsAppSDK()
   at <Module>..cctor()

Expected cause of problem
Windows App SDK publishes Microsoft.WindowsAppRuntime.Bootstrap.dll missing.
(I think this is a Windows App SDK 1.0 bug.)
Case 2
Please include DDLM check and install in your program.
You can refer to the document below.
Module Initializers : https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/module-initializers
Microsoft WindowsAppRuntime DDLM Install : https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/deploy-unpackaged-apps

@Realinspirer I had a similar experience. Please check this part. I am distributing the program without using MSIX this way.
Case 1
If an error similar to the Windows Event Log occurs, it is considered a bug in the publish function.
Application: App1.exe
CoreCLR Version: 6.0.121.56705
.NET Version: 6.0.1
Description: The application requested process termination through Environment.FailFast.
Message: Dll was not found.
Stack:
   at System.Environment.FailFast(System.String)
   at Microsoft.Windows.ApplicationModel.DynamicDependency.BootstrapCS.AutoInitialize.AccessWindowsAppSDK()
   at <Module>..cctor()

Application: App1.exe
CoreCLR Version: 6.0.121.56705
.NET Version: 6.0.1
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: Unable to find an entry point named 'MddBootstrapInitialize' in DLL 'Microsoft.WindowsAppRuntime.Bootstrap.dll'.
Stack:
   at System.Environment.FailFast(System.String)
   at Microsoft.Windows.ApplicationModel.DynamicDependency.BootstrapCS.AutoInitialize.AccessWindowsAppSDK()
   at <Module>..cctor()

Expected cause of problem Windows App SDK publishes Microsoft.WindowsAppRuntime.Bootstrap.dll missing. (I think this is a Windows App SDK 1.0 bug.)
Case 2
Please include DDLM check and install in your program. You can refer to the document below.
Module Initializers : https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/module-initializers Microsoft WindowsAppRuntime DDLM Install : https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/deploy-unpackaged-apps

Will Self-contained feature come to WinUI 3? I have done many things, but still can't figure out the problem. I also checked the Event Logs; it just says that random (not same every time) dlls not found and sometime some other error. I checked if Self-contained is available or not, but didn't found much. I found out about this - <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>. But it doesn't work.

Is this the "next" generation of MS program? Project reunion? My experience has been nothing but bad about this WIN UI thing. Please make it an exe and when i double click on it, it runs everywhere.

Is this the "next" generation of MS program? Project reunion? My experience has been nothing but bad about this WIN UI thing. Please make it an exe and when i double click on it, it runs everywhere.

WinUI3 is still improving day by day. Don't worry everything will be fixed. And for the time being, you can use the MSIX packaging system, so it's not a big deal. Unpackaged apps are also there, but I think there's some deployment issue with that.  And also, why to keep using the old school things, that's what I think. So, think ahead, and don't become a conservative. ☺

I'm trying to find a way to run a WINUI application the traditional way, just double-click the EXE file and launch it.
But I didn't find a way, I gave up on WINUI temporarily.
Hopefully, WINUI can do this like a WPF application.

I think that’s how it is supposed to be, just a double-click to open exe file, except for just requiring a runtime package. But for some problems/reasons that is not working. Even after installing the runtime package it is still failing to load up the app. I don’t know what to even do, and MSIX packaging is not the way to do it. The crazy part - the app I made ran on my PC (PC that I used to make it) and even on my old PC after I installed the runtime packages on it. But when I distributed it to others, it was not running on their PC, so I cleaned up my old PC, reinstalled Windows, then installed the runtime packages on that computer. AND TO MY SURPRISE IT DIDN'T RUN??? Why? I have no answer. Why did it ran the other time but not this time? Maybe there’s something that is required else than just the runtime package, but the main thing is that I DIDN'T USE MY OLD PC TO MAKE THAT APP! I seriously have no idea what the freak happened! Aaah… I think it’s just an everyday programmer problem lmao.

From: Paster @.>
Sent: Saturday, April 16, 2022 9:29:43 PM
To: microsoft/microsoft-ui-xaml @.>
Cc: Realinspirer @.>; Mention @.>
Subject: Re: [microsoft/microsoft-ui-xaml] How to build and deploy an unpackaged app made using C# "WinUI 3 in Desktop", so that I can distribute it to others? (Issue #6620)
I'm trying to find a way to run a WINUI application the traditional way, just double-click the EXE file and launch it.
But I didn't find a way, I gave up on WINUI temporarily.
Hopefully, WINUI can do this like a WPF application.
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/microsoft-ui-xaml/issues/6620#issuecomment-1100697047, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXLC4LQHFB3D35TSP7KKUGLVFLPW7ANCNFSM5MIHTN4Q.
You are receiving this because you were mentioned.Message ID: @.***>

I'm trying to find a way to run a WINUI application the traditional way, just double-click the EXE file and launch it. But I didn't find a way, I gave up on WINUI temporarily. Hopefully, WINUI can do this like a WPF application.

I think that’s how it is supposed to be, just a double-click to open exe file, except for just requiring a runtime package. But for some problems/reasons that is not working. Even after installing the runtime package it is still failing to load up the app. I don’t know what to even do. MSIX packaging is not the way to do it. The crazy part - the app I made ran on my PC (PC that I used to make it) and even on my old PC after I installed the runtime packages. But when I distributed it to others, it was not running on their PC, so I cleaned up my old PC, reinstalled Windows, then installed the runtime packages on that computer. AND TO MY SURPRISE IT DIDN'T RUN??? Why? I have no answer. Why did it ran the other time but not this time? Maybe there’s something that is required else than just the runtime package, but the main thing is that I DIDN'T USE MY OLD PC TO MAKE THAT APP! I seriously have no idea what the freak happened! Aaah… I think it’s just an everyday programmer problem lmao.

I'm also struggling with this. I can get an unpackaged app building and working where I can run it right from the exe, but not when it's actually installed through a setup program.

I am also facing the issue with exe of WinUI Unpackaged application. Please find below scenarios:

Not able to run the exe of unpackaged application in other any PC that was created in windows 10 machine.
Able to run the exe of unpackaged application in other PC that was created in windows 11 machine.

Are you using WebView2 by chance? If not, use the Event Viewer on windows to see if there are any application errors. Unfortunately, unpackaged apps aren’t working well at the moment so I would avoid building them until some big blockers are resolved. We had to switch to WPF in the meantime

I'm assuming you all installed the required runtimes on those machines? I have no issue launching unpackaged exe's after they've been installed and assuming I'm not using any broken APIs like WebView2

I'm assuming you all installed the required runtimes on those machines? I have no issue launching unpackaged exe's after they've been installed and assuming I'm not using any broken APIs like WebView2

Yeah, you sure can assume that. Well, I am not alone on the boat. Unpackaged apps are not running on different machines for many. Also, no, it didn't use WebView2. It was a simple app.

Alright, well this looks like yet another issue for the long list of unpackaged app issues

Alright, well this looks like yet another issue for the long list of unpackaged app issues

One more thing. Now that I think about it, I think that Event Viewer may have something interesting. Well, if I remember, one of the dll mentioned was 'PerfWatson' or something. But the point is that this dll is included in Visual Studio, right? Then why it's being mentioned in the unpackaged app's failure event log? Also note that, I am just trying to recall a few things from my memory, that's a bit foggy, so, I may not remember correctly. No I don't have Alzheimer's, it's just that I have tackled with WINUI 3 long ago.
I may soon check it again. But I don't know why but that dll is something I feel like I am quite sure of. But still not sure.

It's been more than a year, and developers still can't deploy their apps to one single exe? Ridiculous...

This works for me, if using WinUI3...
[In your csproj]
<PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
    <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <Platforms>x86;x64</Platforms>
    <RuntimeIdentifiers>win10-x86;win10-x64</RuntimeIdentifiers>
    <UseWinUI>true</UseWinUI>
    <EnableMsixTooling>true</EnableMsixTooling>
    <!--
        WindowsPackageType defines whether your app is packaged (MSIX) or unpackaged (None)
    -->
    <WindowsPackageType>None</WindowsPackageType>
    <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
</PropertyGroup>

You'll need to also make sure you've selected "Unpackaged" from the debugging dropdown...

If you do not see the (Unpackaged) option, you should confirm your launchSettings.json has the two profiles configured...
{
  "profiles": {
    "WinUIDemo (Package)": {
      "commandName": "MsixPackage"
    },
    "WinUIDemo (Unpackaged)": {
      "commandName": "Project",
    }
  }
}

Self-contained is the default deployment mode by using the Publish option.

If your app is packaged with external location or unpackaged, then the Windows App SDK dependencies are copied next to the .exe in your build output. You can xcopy-deploy the resulting files, or include them in a custom installer.

But for the Framework-dependent deployment mode, check the Prerequisites beforehand. You need to use the same Major version as yourWindows App SDK for Windows Runtime.
I deployed successfully using both of the deployment modes.

authors: DaZiYuan FinnurHrafn GuildOfCalamity Realinspirer SubashiniMahendran danielttran mlynch sh0622-kim symonxdd xiaopoyang-msft


text:
Putting ItemsRepeater inside ScrollViewer throws exception

Describe the bug
If ItemsRepeater is added into the WinUI version of ScrollViewer following exception is thrown
{System.InvalidCastException: Unable to cast object of type 'Microsoft.UI.Xaml.Controls.InputKind' to type 'System.Int32'.
at Microsoft.UI.Xaml.Markup.XamlReflectionType.CreateFromString(String value)}
Steps to reproduce the bug
<Page
    x:Class="WinUITest.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:WinUITest"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="using:Microsoft.UI.Xaml.Controls"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <Grid>
        <!--<controls:ItemsRepeaterScrollHost>-->
            <controls:ScrollViewer x:Name="ScrollViewer">
                <controls:ItemsRepeater x:Name="CategoryList" >
                    <controls:ItemsRepeater.ItemTemplate>
                        <DataTemplate x:DataType="x:String">
                            <TextBlock Text="{x:Bind}"/>
                        </DataTemplate>
                    </controls:ItemsRepeater.ItemTemplate>
                    <controls:ItemsRepeater.Layout>
                        <controls:StackLayout Orientation="Vertical" Spacing="20" />
                    </controls:ItemsRepeater.Layout>
                </controls:ItemsRepeater>
            </controls:ScrollViewer>
        <!--</controls:ItemsRepeaterScrollHost>-->

    </Grid>
</Page>

Expected behavior
It should work same as OS version of ScrollViewer
Version Info

NuGet package version:
2.2.190430003-prerelease

Windows 10 version
Saw the problem?

Insider Build (xxxxx)

October 2018 Update (17763)

April 2018 Update (17134)
Yes

Fall Creators Update (16299)

Creators Update (15063)

Anniversary Update (14393)

Device form factor
Saw the problem?

Desktop
Yes

Mobile

Xbox

Surface Hub

IoT

@harvinders, thanks for trying out the new ScrollViewer and reporting!  This is a known issue caused by a bug in the markup compiler that only affects Debug builds (#594).  The latest Win10 SDK contains a markup compiler with the fix.  You'll need to install that version of the SDK if you don't have it already.  You can still have it target earlier versions of the OS, but I think you'll have to bump the app's target version to something more recent to ensure compilation uses the latest drop of the markup compiler.
Sorry for the extra hoops.  Is there a place we could have documented the above that would have been helpful to you?

Right now searching on that error doesn't produce any matching search results. As long as a quick search can find people the workaround I think we're fine... but we're not in that place. The question is which docs are a good candidate to park this compatibility error. @micahl any suggestions?

I think a simple compilation error would have been enough, if that is possible. Otherwise even a runtime exception with proper explanation would have been better.

@harvinders, @RBrid is going to bump the required target SDK version for our prerelease packages.  That should help folks avoid hitting this error.  Thanks for your feedback!

authors: chrisglein harvinders micahl


text:
Letters with accents written twice

monaco-editor version: 0.13.0
Browser: Firefox
OS: Ubuntu
When you write a letter with an accent (such as á) it is written twice on Firefox under Ubuntu.
I've made tests and it happens with the last few Firefox 64-bit versions up to the newest (60.0) under Ubuntu 16.04 xenial x86-64. Also tested on an Ubuntu 16.04 live usb that includes firefox 64-bit version 51.0.1 to discard a particular problem with the first firefox.
Also checked with chromium in this ubuntu version and firefox in windows and works fine.
I've performed the tests here: https://microsoft.github.io/monaco-editor/index.html so it is not a problem with my implementation of monaco

Hi,Have you solved this problem? Or do you have any good ideas to deal with this problem?
Thank you

monaco-editor version: 0.16.2
Browser: Firefox v66.0.3
OS: Mac Mojave v10.14.3
Found out it also happens in firefox with mac

I could no longer reproduce on the latest at https://vscode-web-test-playground.azurewebsites.net/ so I believe this was resolved with https://github.com/microsoft/vscode/pull/106873

repo: microsoft/monaco-editor


text:
Add token classifiction for named entity recognition.

Description

Add TokenClassification class and class TokenClassificationProcessor class for named entity recognition. So far, only pretrained BERT model is supported.
Related Issues

Checklist:

[ ] My code follows the code style of this project, as detailed in our contribution guidelines.
[ ] I have added tests.
[ ] I have updated the documentation accordingly.

Should the named_entity_recognition.py script be renamed to token_classification.py? I don't know other use case of token classification though. :) @saidbleik thoughts?

Should the named_entity_recognition.py script be renamed to token_classification.py? I don't know other use case of token classification though. :) @saidbleik thoughts?
As a task name, NER is more common. I guess we're using token classification because of BertForTokenClassification.

authors: hlums kehuangms saidbleik

repo: microsoft/nlp


text:
Multi GPU training with nni Retiarii Multi-Trial or One-Shot NAS

Question
If I want to use multiple GPUs (say 8 GPUs) with retiarii which one of the following is "correct"?

In Multi-Trial NAS, instantiate a pl.Trainerclass with given number of gpus, i.e. pl.Trainer(..., gpus=8)
In Multi-Trial NAS, set  trial_gpu_number=8  in  a RetiariiExeConfig instance
In One-Shot NAS, use one of the implemented one-shot trainers, set device=torch.device("cuda") and let retiarii decide how to partition and train the super-model, as well as how to feed/sync data with multiple GPUs.

Another some-what related question is that

Is it possible to use pytorch-lightning and/or  RetiariiExperiment with  One-Shot NAS?

Multi-Trial
If we use the multi-trial method and implement a Lightning object. e.g.
import nni.retiarii.evaluator.pytorch.lightning as pl
from nni.retiarii.experiment.pytorch import RetiariiExperiment

lightning = pl.Lightning(AutoEncoder(),
                         pl.Trainer(max_epochs=10),
                         train_dataloader=pl.DataLoader(train_dataset, batch_size=100),
                         val_dataloaders=pl.DataLoader(test_dataset, batch_size=100))

Presumably we can instantiate pl.Trainer with pl.Trainer(..., gpus=8) since the class is basically a wrapper of the Trainer class in pytorch-lighting?
One-Shot
Assume we use the one-shot trainer DartsTrainer as shown in the documentation
from nni.retiarii.oneshot.pytorch import DartsTrainer
trainer = DartsTrainer(
    model=model,
    loss=criterion,
    metrics=lambda output, target: accuracy(output, target, topk=(1,)),
    optimizer=optim,
    num_epochs=args.epochs,
    dataset=dataset_train,
    batch_size=args.batch_size,
    log_frequency=args.log_frequency,
    unrolled=args.unrolled
)
trainer.fit()
final_architecture = trainer.export()

To the best of my knowledge,  except the fact that we can set device=torch.device("cuda") in most one-shot trainers, there's no retiarii APIs specifically controls the way we use the GPUs (for example, some API that accept argument like gpus=8).  retiarii uses multiple GPUs to accelerate the training and exploration process via methods like Mixed-Parallelism and Weight-Sharing, and handles model/data allocation/feed automatically?

In multi-trial NAS, you should set both gpus=8 in trainer and trial_gpu_number=8 in experiment config.
In one-shot NAS, unfortunately we don't support multi-GPU in one-shot trainers natively due to implementation limitation. So far, you still have to inherit the trainer or copy the trainer code for customization. We have a plan to support one-shot algorithms in a more general framework, which is probably in next few months.

Closing the issue as the answer has been provided.
@Waerden001 - feel free to re-open the issue if the answer does not resolve your question, thanks.

In multi-trial NAS, you should set both gpus=8 in trainer and trial_gpu_number=8 in experiment config.
In one-shot NAS, unfortunately we don't support multi-GPU in one-shot trainers natively due to implementation limitation. So far, you still have to inherit the trainer or copy the trainer code for customization. We have a plan to support one-shot algorithms in a more general framework, which is probably in next few months.

repo: microsoft/nni


text:
yolox使用L1NormPrune后，模型大小仅仅从3797K降低到3784K

img_size = 416
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = YoloBody(num_classes, phi)

model.load_state_dict(torch.load(weights, map_location=device))

#summary(model, (3, 64, 64), device="cpu")

print('\nThe accuracy with masks:')
model_train = model.train()
yolo_loss    = YOLOLoss(3)
    #---------------------------------------#
    #   根据optimizer_type选择优化器
    #---------------------------------------#
pg0, pg1, pg2 = [], [], []
for k, v in model.named_modules():
    if hasattr(v, "bias") and isinstance(v.bias, nn.Parameter):
        pg2.append(v.bias)
    if isinstance(v, nn.BatchNorm2d) or "bn" in k:
        pg0.append(v.weight)
    elif hasattr(v, "weight") and isinstance(v.weight, nn.Parameter):
        pg1.append(v.weight)
optimizer = {
    'adam'  : optim.Adam(pg0, Init_lr_fit, betas = (momentum, 0.999)),
    'sgd'   : optim.SGD(pg0, Init_lr_fit, momentum = momentum, nesterov=True)
}[optimizer_type]
optimizer.add_param_group({"params": pg1, "weight_decay": weight_decay})
optimizer.add_param_group({"params": pg2})
criterion = torch.nn.CrossEntropyLoss()
traced_optimizer = nni.trace(torch.optim.SGD)(model.parameters(), lr=0.01, momentum=0.9, weight_decay=5e-4)
print(model)
fit_one_epoch(model_train, model, yolo_loss, optimizer, 3, num_train/2, epoch_step_val, gen, gen_val, UnFreeze_Epoch, True)
config_list = [{'op_types': ['Conv2d'], 'sparsity': 0.5}]
pruner=L1NormPruner(model, config_list)
pruner.compress()
#pruner = SlimPruner(model, config_list,trainer, traced_optimizer, criterion, training_epochs=1, scale=0.0001, mode='global')

pruner.export_model(model_path='pruned_yolov5n-0.5.pth', mask_path='mask_yolov5n-0.5.pth')

pruner._unwrap_model()
ModelSpeedup(model, dummy_input=torch.rand([8, 3, 64, 64]).to("cpu"),masks_file='mask_yolov5n-0.5.pth').speedup_model()
#pruner.show_pruned_weights()
print(model)

fit_one_epoch(model_train, model, yolo_loss, optimizer, 3, num_train/2, epoch_step_val, gen, gen_val, UnFreeze_Epoch, True)
torch.save(model.state_dict(), os.path.join('logs', "yolo_prune.pth"))
#apply_compression_results(model, 'mask_yolov5n-0.5.pth', "cpu")

#torch.save(model.state_dict(), "use_mask_small_model.pth")
print('\n' + '=' * 50 + ' EVALUATE THE MODEL AFTER SPEEDUP ' + '=' * 50)

以上是我的代码，在剪枝和加速运行后模型大小依旧没去掉多少，Conv2d依旧存在，请问这个问题需要如何解决呢，求大佬解答

@maziyi234 是不是还没run speedup?

@maziyi234是不是运行加速？

在运行加速时候 ，我的模型是func类，怎么把它展开变成module类型呢，我报的警告如下：
.warning  'Cannot replace a reused module with padding operator!!'

@maziyi234是不是运行加速？

或者 是什么原因导致 剪枝加速后，模型大小不下降呢

hello @maziyi234 , could you show where can find YoloBody, we will try to reproduce your problem.

你好@maziyi234，你可以在哪里找到YoloBody，我们将试探在你的问题上。

class YoloBody(nn.Module):
def init(self, num_classes, phi):
super().init()
depth_dict = {'nano': 0.33, 'tiny': 0.33, 's' : 0.33, 'm' : 0.67, 'l' : 1.00, 'x' : 1.33,}
width_dict = {'nano': 0.25, 'tiny': 0.375, 's' : 0.50, 'm' : 0.75, 'l' : 1.00, 'x' : 1.25,}
depth, width    = depth_dict[phi], width_dict[phi]
depthwise       = True if phi == 'nano' else False
    self.backbone   = YOLOPAFPN(depth, width, depthwise=depthwise)
    self.head       = YOLOXHead(num_classes, width, depthwise=depthwise)

def forward(self, x):
    fpn_outs    = self.backbone.forward(x)
    outputs     = self.head.forward(fpn_outs)
    return outputs

你好@maziyi234，你可以在哪里找到YoloBody，我们将试探你的问题。

Uploading yolo.txt…

你好@maziyi234，你可以在哪里找到YoloBody，我们将试探你的问题。

Uploading yolo.txt…

@maziyi234 , seems you comment before your file uploading finished, please try to upload again.

你好@maziyi234，你可以在哪里找到YoloBody，我们将试探你的问题。

正在上传 yolo.txt...

@maziyi234，看来您在文件上传完成前发表评论，请尝试重新上传。

链接：https://pan.baidu.com/s/1r26H2UiBmWZYOwvoE25xmw
提取码：y2yj

你好@maziyi234，你可以在哪里找到YoloBody，我们将试探你的问题。

正在上传 yolo.txt...

@maziyi234，看来您在文件上传完成前发表评论，请尝试重新上传。

链接：https://pan.baidu.com/s/1r26H2UiBmWZYOwvoE25xmw 提取码：y2yj

yolo.py是里头的网络结构

你好@maziyi234，你可以在哪里找到YoloBody，我们将试探你的问题。

正在上传 yolo.txt...

@maziyi234，看来您在文件上传完成前发表评论，请尝试重新上传。

链接：https://pan.baidu.com/s/10hpe-dsLqq5xrkOtoYFBTg
提取码：ovix

there are some messy issues when speedup your yolo model, we will let you know when they are fixed.


text:
chore(evaluator): add and fix typing annotations

Stack from ghstack (oldest at bottom):

#383
-> #382

@gramalingam could you take a look? Thanks!

repo: microsoft/onnx-script


text:
hot fix for hdfs CORS problem

using pylon when uploading file to avoid cors block by browser

Coverage remained the same at 51.575% when pulling 176f9e095ccaabe8890f2cef26fd38ed7e625d74 on mintao/cors into 65d1ab58c7b0a19a2964eeb19f4bbbbb3111ae24 on pai-0.14.y.

authors: coveralls debuggy

repo: microsoft/pai


text:
[Feature] Avoid async delegates

We are trying to use Page.RequestFinished however the advocated approach involves async delegates which triggers this analyzer and it does appear to be causing some issues for us but since the request only has ResponseAsync it is a bit hard to avoid using async inside. It would be if there was a way around this or to have a synchronous way of getting the response. Afterall that is probably what most people are interested in when using RequestFinished specifically

@mxschmitt I was about to recommend RunAndWaitForRequestFinishedAsync. But the problem I found there is that the Predicate is a Func<Request, bool> and it would be nice to have a Func<Request, Task<bool>> option.

Sounds like https://github.com/microsoft/playwright-dotnet/issues/2576

I cannot speak to the similarity as we are interested in specifically the callback. We are using it to keep track of all the API calls that are triggered by the Playwright tests and then know what data to clean up after the tests is complete. We are interested in some response data as it contains ID's and therefore we have to look at the response which unfortunately for us is only available as an async operation.
If only we could it synchronously like this it would serve our needs:
page.RequestFinished += (page, request) =>
  {
    _tracking.Save(request.Url, request.Response());
  }

I see, there is unfortunately no sync way of getting the response. I recommend either listening on "Response" event instead, which is fired after RequestFinished. Would that work for you?

@mxschmitt Maybe I have misunderstood you but the Response event gives a Response object which is also very async-focused. Did I miss a way to get the response body in a synchronous way on Response? It seems to me that I'll be facing the same problem whether we use Response or RequestFinished events.

Oh ok, then there is no way, then maybe collect the Request/Response objects and bulk process them at the end of your tests or before you navigate?

Yeah I'm contemplating that solution too. Even though that will also have a downside: https://github.com/Microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD003.md

Sounds then unfortunately a won't fix to me, since we can't change our model to have sync getters.
I'd recommend for now to disable the specific analyzer rules.

Closing as per above, since this is more of a linter problem rather than an actual bug/feature request in Playwright.

authors: kblok mathiasi mxschmitt

repo: microsoft/playwright-dotnet


text:
[Bug]: Page.onClose is not called with browser window is closed

Version
1.49.0
Steps to reproduce
git clone git@github.com:davidnewcomb/playright-bug-onclose.git
cd playright-bug-onclose
mvn clean install

Expected behavior
When I close the window then Page.onClose{} should fire.
Actual behavior
Page.onClose{} is only called when I call page.close() or browserContext.close().
Additional context
I created 2 tests that run consecutively one which uses BrowserContext and one which does not use BrowserContext. Both tests never first page.onClose when I close the window or close the tab.
Environment
-Operating System: MacOS Sequioa 15.2
-CPU: intel core i9
-Browser: Nightly
-Java version: Java version: 22.0.1, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk/22.0.1/libexec/openjdk.jdk/Contents/Home
-Java compiled for v 1.8 and 21
-Tested on Nightly/firefox and Chromium
-Maven: 3.9.8
-Running in: Spring Tool Suite 4 - Version: 4.26.0.RELEASE

I believe this is intentional behavior.
If we reference the browser.close() documentation, we see a note:

This is similar to force quitting the browser. Therefore, you should call BrowserContext.close() on any BrowserContext's you explicitly created earlier with Browser.newContext() before calling Browser.close().

If you want your page.onClose method to fire, you need to use browser.close or browserContext.close.
Here is where browser.close sends the close message
Here is where browserContext.close does the same

Please can you reopen this issue.
I'm confused by your answer, how can I tell if the Browser is gone in order to call BrowserContext.close and clean up? Playwright doesn't tell me when the Browser disappears!
According to the documentation ( https://playwright.dev/java/docs/api/class-browsercontext#browser-context-event-close ) it says that if The browser is closed/crashes, external to what Playwright is telling it to do then BrowserContext.close gets called.
This is not happening. I can shutdown the browser with control+q, click the [X] window button and Playwright does not notice!

Demonstration for this issue moved to https://github.com/davidnewcomb/playright-bug-onclose/tree/bug_1714

authors: Drew-Ackerman davidnewcomb

repo: microsoft/playwright-java


text:
[BUG]: "App Archive and Clean Up - Check Approvals and Archive" Error in action "_get_msapp_file_content"

Describe the bug
Flow "Admin | App Archive and Clean Up - Check Approvals and Archive" runs sometimes into Error in action 'Approve_Archive_-_get_msapp_file_content'
Ouputs of this action:
Status Code: 403
Body:
AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:cc6eb2fc-201e-0062-4989-5081ad000000
Time:2020-07-02T15:54:32.2647643ZSigned expiry time [Tue, 26 May 2020 00:00:00 GMT] must be after signed start time [Thu, 02 Jul 2020 15:54:32 GMT]
I would say the error appears in 50% of the cases.
Component (please tell us which flow or app you are experiencing issues with):

Center of Excellence - Compliance and Report Components
Version 20.4.2020
Admin | App Archive and Clean Up - Check Approvals and Archive

This is resolved in newer versions of the toolkit. You will need to upgrade.
Thanks for using CoE!

#182

Thanks for your answer. But I'm using Version 1.17 and seems to be the newest version?

Did you chose override when asked about customizations on import? Default is maintain, but you need to chose overwrite.

When you have the new flow, it will have this added re-fetch call

damn. Sorry, you're right.
Thanks very much for that hint!

No problem at all. Thanks for using CoE!

authors: JeneferM-MSFT baxist

repo: microsoft/powerapps-tools


text:
actionButton "press" state not applying in Desktop

Since @yelper pointed out the different states for actionButton in #50 , I want to point out that neither pressed or press (as it used to be) have any effect inside Power BI Desktop - the visual defaults back to the default state.
I am currently on Power BI Desktop for Report Server (May 2023), so I should ask if others experience the same issue?
Example
(...)
		"actionButton": {
			"*": {
				"shadow": [
					{
						"show": true
					},
					{
						"$id": "default",
						"transparency": 0,
						"shadowBlur": 20,
						"shadowPositionPreset": "center"
					},
					{
						"$id": "hover",
						"transparency": 0,
						"shadowBlur": 20
					},
					{
						"$id": "press",
						"transparency": 95,
						"shadowBlur": 25
					},
					{
						"$id": "disabled",
						"transparency": 20,
						"shadowBlur": 0
					}
				]
			}
		}

The correct selector should be "selected", not "press".
I'm aiming to push an update to suggest available $id values in the December release of the schema; here's a sneak peak of what it'll look like.

repo: microsoft/powerbi-desktop-samples


text:
Catch and log ValueError exceptions

Found that there are ValueError exceptions when validating results using 3 different classifiers. Added try/exception block to catch these errors, and to log these errors.
Modified logger class to have support an exception method, which is standard when using default python loggers.

 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.:x: darindf sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

Hi @darindf, Thanks for your contribution!

Please add unit tests for the updated code
Please make sure the pytest, flake8 and pylint complete successfully (see the contribution guidelines here: https://github.com/microsoft/presidio/blob/master/CONTRIBUTING.md#how-to-test)
Otherwise the build won't succeed and we will not be able to approve the PR.

authors: darindf msftclas omri374

repo: microsoft/presidio


text:
Parameters in blocks should show tooltip with parameter documentation

Feature request template
Is your feature request related to a problem? Please describe.
In blocks, it can be hard to identify what a parameter represents. The tool tips don't consistently trigger, and when they do it's usually info about the shadow block - a description of what a number or string is, or a preview of the line the variable was defined in.
Describe the solution you'd like
Should show parameter documentation if that exists, or parameter name if it does not. This should match the JavaScript tooltips where the @params annotation in the comment shows up properly:

Additional context
Seems to apply to all editors, but is particularly problematic for Arcade where a lot of blocks are really long / wordy
@samelhusseini

Won't fix. Blocks needs to be intuitive. Hover doesn't work on touch devices.

authors: abchatra jwunderl

repo: microsoft/pxt-arcade


text:
Share Project QR code isn't aligned properly

Describe the bug
Very hard to see in screenshot but when publishing  and sharing project the QR code that appears isn't aligned properly and the line separating the buttons for Facebook/twitter and the Embed drop down cuts through it.
To Reproduce
Steps to reproduce the behavior:

Share and publish any project

Expected behavior
Gray line divider doesn't cut through QR code
Screenshots

Desktop (please complete the following information):

OS: Windows
Browser Edge

is this a regression? This is what live shows me right now:

No, not a regression

Oh! Thanks for checking it. Will remove the tags and make p2.

authors: dmonroym eanders-MS livcheerful


text:
Update floating workspace elements on resize

Fixes https://github.com/microsoft/pxt-microbit/issues/2903
This happens when the workspace resizes without hiding the floating elements (dropdowns, "active" fields, etc). I tested against the collapse/expand simulator case, but it should apply to anywhere we use the editor.resize() call.

Also happens when a warning sign is removed while editing a text field.

hmm let me investigate

authors: pelikhan shakao

repo: microsoft/pxt


text:
reportMissingModuleSource : psycopg2 (postgres module in python)

Environment data

Language Server version: 2021.8.3
OS and version: windows 10 21H1 (OS build 19043)
Python version (& distribution if applicable, e.g. Anaconda): python3.9 (& pip)

Expected behaviour
No error or warning or issues
Actual behaviour
the module name has orange underline and vscode brought me to this repo to reportMissingModuleSource
Logs

[Info  - 9:08:35 pm] No configuration file found.
[Info  - 9:08:35 pm] No pyproject.toml file found.
[Info  - 9:08:35 pm] Setting pythonPath for service "password-manager": "C:\Users\Lijin\AppData\Local\Microsoft\WindowsApps\python3.9.exe"
[Warn  - 9:08:35 pm] stubPath c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\typings is not a valid directory.
[Info  - 9:08:36 pm] Assuming Python version 3.9
[Info  - 9:08:36 pm] Assuming Python platform Windows
Search paths for c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager
  c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib
  c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager
  c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\typings
  c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stubs\...
  c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\bundled\stubs
  c:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\DLLs
  c:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\Lib
  c:\Users\Lijin\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0
  c:\Users\Lijin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages
  c:\Users\Lijin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\win32
  c:\Users\Lijin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\win32\lib
  c:\Users\Lijin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pythonwin
  c:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0
  c:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\Lib\site-packages
[Info  - 9:08:37 pm] Searching for source files
[Info  - 9:08:37 pm] Found 3 source files
Background analysis message: setConfigOptions
Background analysis message: setImportResolver
Background analysis message: ensurePartialStubPackages
Background analysis message: setTrackedFiles
Background analysis message: markAllFilesDirty
Background analysis message: getSemanticTokens delta
[BG(1)] getSemanticTokens delta previousResultId:1630250915007 at c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\postg.py ...
[BG(1)]   parsing: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\postg.py (416ms)
[BG(1)]   parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\builtins.pyi [fs read 1ms] (122ms)
[BG(1)]   binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\builtins.pyi (25ms)
[BG(1)]   binding: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\postg.py (5ms)
[BG(1)]   parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\typing.pyi [fs read 2ms] (58ms)
[BG(1)]   binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\typing.pyi (17ms)
[BG(1)]   parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\_typeshed\__init__.pyi [fs read 1ms] (18ms)
[BG(1)]   binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\_typeshed\__init__.pyi (4ms)
[BG(1)]   parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\typing_extensions.pyi [fs read 1ms] (10ms)
[BG(1)]   binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\typing_extensions.pyi (3ms)
[BG(1)]   parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stubs\psycopg2\psycopg2\__init__.pyi [fs read 2ms] (15ms)
[BG(1)]   binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stubs\psycopg2\psycopg2\__init__.pyi (1ms)
[BG(1)]   parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\os\__init__.pyi [fs read 2ms] (34ms)
[BG(1)]   binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\os\__init__.pyi (7ms)
[BG(1)]   parsing: c:\Users\Lijin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\dotenv\__init__.py [fs read 1ms] (2ms)
[BG(1)]   binding: c:\Users\Lijin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\dotenv\__init__.py (1ms)
[BG(1)]   parsing: c:\Users\Lijin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\dotenv\main.py [fs read 1ms] (27ms)
[BG(1)]   binding: c:\Users\Lijin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\dotenv\main.py (5ms)
[BG(1)]   parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\sys.pyi [fs read 1ms] (14ms)
[BG(1)]   binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\sys.pyi (3ms)
[BG(1)]   parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\types.pyi [fs read 1ms] (19ms)
[BG(1)]   binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\types.pyi (6ms)
[BG(1)]   parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stubs\psycopg2\psycopg2\_psycopg.pyi [fs read 1ms] (24ms)
[BG(1)]   binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stubs\psycopg2\psycopg2\_psycopg.pyi (6ms)
[BG(1)] getSemanticTokens delta previousResultId:1630250915007 at c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\postg.py (869ms)
Background analysis message: getSemanticTokens delta
[BG(1)] getSemanticTokens delta previousResultId:1630250437052 at c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\main.py ...
[BG(1)]   parsing: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\main.py (14ms)
[BG(1)]   binding: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\main.py ...
[BG(1)]     parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\tkinter\__init__.pyi [fs read 1ms] (78ms)
[BG(1)]     binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\tkinter\__init__.pyi ...
[BG(1)]       parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\tkinter\constants.pyi [fs read 1ms] (2ms)
[BG(1)]       binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\tkinter\constants.pyi (1ms)
[BG(1)]     binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\tkinter\__init__.pyi (41ms)
[BG(1)]   binding: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\main.py (122ms)
[BG(1)]   parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\tkinter\font.pyi [fs read 1ms] (5ms)
[BG(1)]   binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\tkinter\font.pyi (2ms)
[BG(1)]   parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\abc.pyi [fs read 1ms] (2ms)
[BG(1)]   binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\abc.pyi (0ms)
[BG(1)] getSemanticTokens delta previousResultId:1630250437052 at c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\main.py (186ms)
Background analysis message: getSemanticTokens delta
[BG(1)] getSemanticTokens delta previousResultId:1630237614382 at c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\firstPage.py ...
[BG(1)]   parsing: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\firstPage.py (0ms)
[BG(1)]   binding: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\firstPage.py (0ms)
[BG(1)] getSemanticTokens delta previousResultId:1630237614382 at c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\firstPage.py (0ms)
Background analysis message: analyze
[BG(1)] analyzing: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\main.py ...
[BG(1)]   checking: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\main.py (6ms)
[BG(1)] analyzing: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\main.py (6ms)
[BG(1)] analyzing: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\postg.py ...
[BG(1)]   checking: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\postg.py ...
[BG(1)]     parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\os\path.pyi [fs read 1ms] (5ms)
[BG(1)]     binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\os\path.pyi ...
[BG(1)]       parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\ntpath.pyi [fs read 1ms] (5ms)
[BG(1)]       binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\ntpath.pyi (1ms)
[BG(1)]     binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\os\path.pyi (6ms)
[BG(1)]     parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\posixpath.pyi [fs read 0ms] (2ms)
[BG(1)]     binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\posixpath.pyi (0ms)
[BG(1)]     parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\genericpath.pyi [fs read 0ms] (4ms)
[BG(1)]     binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\genericpath.pyi (0ms)
[BG(1)]     parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\collections\__init__.pyi [fs read 1ms] (12ms)
[BG(1)]     binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\collections\__init__.pyi ...
[BG(1)]       parsing: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\_collections_abc.pyi [fs read 1ms] (1ms)
[BG(1)]       binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\_collections_abc.pyi (0ms)
[BG(1)]     binding: c:\Users\Lijin\.vscode\extensions\ms-python.vscode-pylance-2021.8.3\dist\typeshed-fallback\stdlib\collections\__init__.pyi (4ms)
[BG(1)]   checking: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\postg.py (58ms)
[BG(1)] analyzing: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\postg.py (58ms)
Background analysis message: resumeAnalysis
[BG(1)] analyzing: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\firstPage.py ...
[BG(1)]   checking: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\firstPage.py (0ms)
[BG(1)] analyzing: c:\Users\Lijin\Desktop\Co-Science\Co-Science\Btech\password-manager\firstPage.py (0ms)
Background analysis message: resumeAnalysis

Code Snippet / Additional information

import psycopg2

The interpreter you have selected appears to be a global interpreter (the one installed via the Windows store). Are you sure that's the interpreter you've installed psycopg2 into? You should be able to select at the bottom left in the interpreter selector.

I added the module to the global interpreter and the program seems to be working fine, but the vscode showed a red underline and a link to report for the import pyscopg2

I have the same warnings in VS. (Create a Flask Web Project -> Create a virtual environment ) But, Press F5 can run it successfully.
Build of Visual Studio: 17.0.0 Preview 5.0 [31707.358.main]
Build of Python Package: 17.0.21243.2

Output info

Info: Info: Pylance language server 2021.8.3 (pyright fa4194fd) startingServer root directory: c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\dist

Error: Error reading settings: TypeError: Cannot read property '0' of null
Info: No pyproject.toml file found.
Warning: stubPath typings is not a valid directory.
Info: Assuming Python platform Windows
Info: Searching for source files
Info: No source files found.
Info: Info: Info: Info: Background analysis(1) root directory: c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\distBackground analysis(1) started

Background analysis(2) root directory: c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\distBackground analysis(2) started

Info: Info: Info: Warning: Info: Info: Info: Info: No configuration file found.No pyproject.toml file found.Setting pythonPath for service "FlaskWebProject10": "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\python.exe"stubPath C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\typings is not a valid directory.Assuming Python version 3.9Assuming Python platform WindowsSearching for source filesFound 3 source files

Info: Info: Info: Searching for source filesAuto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\envFound 3 source files

Info: Info: Info: Info: Info: Info: Searching for source filesAuto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\envFound 3 source filesSearching for source filesAuto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\envFound 3 source files

Info: Info: Info: Searching for source filesAuto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\envFound 3 source files

Info: Searching for source files
Info: Auto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\env
Info: Found 3 source files
Error: Info: Warning: Info: Info: Info: Error reading settings: TypeError: Cannot read property '0' of nullNo pyproject.toml file found.stubPath typings is not a valid directory.Assuming Python platform WindowsSearching for source filesNo source files found.

Info: Info: Info: No configuration file found.No pyproject.toml file found.Setting pythonPath for service "FlaskWebProject10": "C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\env\Scripts\python.exe"

Warning: stubPath C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\typings is not a valid directory.
Info: Assuming Python version 3.9
Info: Assuming Python platform Windows
Info: Info: Auto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\env
Searching for source files
Info: Found 3 source files
Info: Searching for source files
Info: Auto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\env
Info: Found 3 source files
Info: Searching for source files
Info: Auto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\env
Info: Found 3 source files
Info: Info: Info: Searching for source filesAuto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\envFound 3 source files

Info: Info: Info: Searching for source filesAuto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\envFound 3 source files

Info: Searching for source filesInfo: Info:
Auto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\envFound 3 source files

Info: Info: Info: Searching for source filesAuto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\envFound 3 source files

Info: Info: Info: Searching for source filesAuto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\envFound 3 source files

Info: Info: Info: Searching for source filesAuto-excluding C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10\envFound 3 source files

@ttSpace I don't think that's related. Particularly, the logs indicate that the folder being opened is C:\Users\vting\source\repos\FlaskWebProject10\FlaskWebProject10, but you're trying to import FlaskWebProject10, which is the name of the workspace. The folder that Pylance should be given as the workspace root is likely C:\Users\vting\source\repos\FlaskWebProject10, but it's not getting that. Consider filing an issue to the PTVS repo, as this appears to be a client problem.

I don't seem to have that.
All that I have are:
_distutils_hack/
pip/
pip-21.2.3.dist-info/
pkg_resources/
setuptools/
setuptools-57.4.0.dist-info/
distutils-precedence.pth
README.txt

I would also check:
c:\Users\Lijin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages

(I missed that there were two site-package folders listed in your logs.)

I couldn't find any there as well, but a quick search in that folder took me to .\sqlalchemy\dialects\postgresql\.
where I found psycopg2.py and psycopg2cffi.py

Those would be the modules sqlalchemy.dialects.postgresql.psycopg2 and such.
It's hard for me to think that this is something other than the module not being installed in your selected interpreter. If there's a terminal where you believe the import is working, try executing this to check the paths there to compare to what Pylance is using:
python -c 'import sys, pprint; pprint.pprint(sys.path)'

Got this after executing that command:
['',
 'C:\\Users\\Lijin\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip',
 'C:\\Users\\Lijin\\AppData\\Local\\Programs\\Python\\Python39\\DLLs',
 'C:\\Users\\Lijin\\AppData\\Local\\Programs\\Python\\Python39\\lib',
 'C:\\Users\\Lijin\\AppData\\Local\\Programs\\Python\\Python39',
 'C:\\Users\\Lijin\\AppData\\Roaming\\Python\\Python39\\site-packages',
 'C:\\Users\\Lijin\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages',
 'C:\\Users\\Lijin\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\win32',
 'C:\\Users\\Lijin\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\win32\\lib',
 'C:\\Users\\Lijin\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\Pythonwin']

Thanks. Those are not the paths Pylance is using, which indicates that you have a different interpreter selected in VS Code than what you are running in the terminal; ensure you select the right one at the bottom left.

Yes VSCode was using the interpreter I installed from windows store(probably from winget).
Changing the interpreter solved the problem.

Thanks for the help @jakebailey

authors: Joel-Nickson jakebailey ttSpace

repo: microsoft/pylance-release


text:
Overloaded functions not recognized

Red squiggles under x, y even though it matches one of the valid function definitions.

Environment data

Language Server version: v2023.6.20
OS and version: Windows 11
Python version (& distribution if applicable, e.g. Anaconda): 3.10.6

Please provide a minimal self-contained code sample that demonstrates the issue. It's unlikely that we can repro this or diagnose the problem from a partial screen shot.

The repro is just that one line.

import cv2

image = cv2.imread('src/lena.jpg')
x = 0
y = 0
width = 100
height = 100
cv2.rectangle(image, (x, y), (x + width, y + height), (0, 0, 255), 2)

Thanks. For future bug reports, a text version would be appreciated so we don't need to retype your code from a screen shot.
import cv2

image = cv2.imread("")
x = 0
y = 0
width = 100
height = 100
cv2.rectangle(image, (x, y), (x + width, y + height), (0, 0, 255), 2)

There is a bug in the cv2 stub that ship with pylance. It defines rectangle as an overload using the overload decorator, but it fails to import overload from the typing module. If you replace @overload with @typing.overload, it works fine.

This issue has been fixed in prerelease version 2023.6.41, which we've just released. You can find the changelog here: CHANGELOG.md

authors: debonte erictraut heejaechang yanxke


text:
Completion items are sent back with a lot of duplicates

Since 3.17, LSP has a way to send duplicate data on completions only once instead of in each completion item.
This here:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem
Doing so could make Pylance faster (and make sync server closer to async server)

Okay this is blocked on possibly changing the LSP client code to combine the data differently:
https://github.com/microsoft/vscode-languageserver-node/issues/1338

Changes taking advantage of this are here:
https://github.com/rchiodo/pyrx/tree/rchiodo/completion_dupes

Another possible size optimization would we to eliminate the textEdit field when it's not necessary. I did a quick test where I typed print and looked through the response. There were 735 items that included textEdit and about 50% of those appeared to be unnecessary -- the range was the range of the identifier we were completing and newText matched the label. I checked this quickly by eye, so I might have missed something.
The other half were functions that needed the textEdit to insert the parens (because I had python.analysis.completeFunctionParens enabled) and move the cursor between them.
Here's a typical textEdit. It's not small...
            "textEdit": {
                "range": {
                    "start": {
                        "line": 13,
                        "character": 0
                    },
                    "end": {
                        "line": 13,
                        "character": 1
                    }
                },
                "newText": "_P"
            },

a lot of range is same since it refer to the same range, if completion has a way to internalize or share range between items, that would save a lot of repeated text.

Somebody fixed this in LSP. We'd just need to adopt the new applyKind:
https://github.com/microsoft/vscode-languageserver-node/pull/1558

authors: debonte heejaechang rchiodo