Missing attributes in module 'PixivException' when timeout occurs?

Prerequisites

[  ] Did you read FAQ section? yes
[  ] Did you test with the latest releases or commit ? release

Description
Hi,
I did a clean upgrade yesterday. I removed all former files of the v20200424 and copy in all the new files of v20200502 while keeping blacklists and config files. However, whenever I pause a download with the pause key or there's a minor timeout in the internet connection (for example upon DSL reconnecting which happens each 24h at my location), PixivUtil2 now errors out since the new version.
Steps to Reproduce

Clean install/upgrade and run PixivUtil2
Start download a larger number of files by either artist, tag or taglist etc.
Press the pause key at some point in order to simulate a short disconnect or timeout
Release the pause with any other key on the keyboard (if you hit Enter, the window may close)

Expected behavior: If the Pause key is pausing an actual download, PixivUtil2 restarts the download. If the Pause key is hit inbetween downloads, PixivUtil2 should work without issues.
Actual behavior: PixivUtil2 doesn't find the exception handles and exits to prompt with these Tracebacks:
Traceback (most recent call last):
  File "PixivDownloadHandler.pyc", line 136, in download_image
  File "PixivDownloadHandler.pyc", line 261, in perform_download
  File "PixivHelper.pyc", line 616, in download_image
  File "mechanize\_response.pyc", line 204, in read
  File "socket.pyc", line 669, in readinto
  File "http\client.pyc", line 498, in readinto
  File "socket.pyc", line 669, in readinto
  File "ssl.pyc", line 1241, in recv_into
  File "ssl.pyc", line 1099, in read
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "PixivDownloadHandler.pyc", line 214, in download_image
AttributeError: module 'PixivException' has no attribute 'DOWNLOAD_FAILED_IO'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "PixivImageHandler.pyc", line 205, in process_image
  File "PixivDownloadHandler.pyc", line 227, in download_image
AttributeError: module 'PixivException' has no attribute 'DOWNLOAD_FAILED_OTHER'
Error at process_image(): 8661195
Exception: (<class 'AttributeError'>, AttributeError("module 'PixivException' has no attribute 'DOWNLOAD_FAILED_OTHER'"), <traceback object at 0x00C11828>)
Dumping html to: Error medium page for image 8661195.html
Error at process_tags() at page 10: (<class 'AttributeError'>, AttributeError("module 'PixivException' has no attribute 'DOWNLOAD_FAILED_OTHER'"), <traceback object at 0x00C11EC8>)
Dumping html to: Error page for search tags %E3%83%89%E3%83%A9%E3%82%B4%E3%83%B3%E3%83%9C%E3%83%BC%E3%83%AB at page 10.html
Error at process_tags_list(): (<class 'AttributeError'>, AttributeError("module 'PixivException' has no attribute 'DOWNLOAD_FAILED_OTHER'"), <traceback object at 0x00C113E8>)
Traceback (most recent call last):
  File "PixivDownloadHandler.pyc", line 136, in download_image
  File "PixivDownloadHandler.pyc", line 261, in perform_download
  File "PixivHelper.pyc", line 616, in download_image
  File "mechanize\_response.pyc", line 204, in read
  File "socket.pyc", line 669, in readinto
  File "http\client.pyc", line 498, in readinto
  File "socket.pyc", line 669, in readinto
  File "ssl.pyc", line 1241, in recv_into
  File "ssl.pyc", line 1099, in read
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "PixivDownloadHandler.pyc", line 214, in download_image
AttributeError: module 'PixivException' has no attribute 'DOWNLOAD_FAILED_IO'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "PixivUtil2.py", line 1577, in main
  File "PixivUtil2.py", line 1291, in main_loop
  File "PixivUtil2.py", line 895, in menu_download_from_tags_list
  File "PixivUtil2.py", line 215, in process_tags_list
  File "PixivUtil2.py", line 191, in process_tags
  File "PixivTagsHandler.pyc", line 126, in process_tags
  File "PixivImageHandler.pyc", line 205, in process_image
  File "PixivDownloadHandler.pyc", line 227, in download_image
AttributeError: module 'PixivException' has no attribute 'DOWNLOAD_FAILED_OTHER'
press enter to exit.

Versions
PixivDownloader2 version 202000502

Getting the same issue with the latest release, every timeout will fatal due to the missing exception handle (if you also happen to be affected by #686 this will make pixivutil unusable).

my fault, wrong import :P


Clone of PR 3190 for testing

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/platform_tests ref=py_311

Couple issues discovered so far:

couple multimodal tests failing
ray and onnxruntime-gpu doesn't support 3.11 yet.

/platform_tests ref=py_311

/platform_tests ref=py_311

/platform_tests ref=py_311

/platform_tests ref=py_311

@ddelange Made some edits based on your PR and all tests are green now. We should be good to go @Innixma


disabled property inside of a form does not return a value for disabled inputs

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Current behavior 😯
Version: 6.8.0 (upgraded 2 weeks ago)
Tried this with 7.0.0-beta.0 (ran into issues with more recent beta releases)
If there is a disabled property on a CheckboxSelect component or a TextFieldElement component, the expected behavior would be that this is still part of the form, but not a value that we want the end user to edit. This was working prior to the v 6.8.0 upgrade (we were previously on version 5.15.1)
Currently this value is not being read by the form
Workaround for this solution is to add a readOnly property and to style the form element to display as a disabled component. This isn't ideal.
Expected behavior 🤔
If there is a disabled property on a CheckboxSelect component or a TextFieldElement component, the expected behavior would be that this is still part of the form, but not a value that we want the end user to edit. This was working prior to the v 6.8.0 upgrade.
Steps to reproduce 🕹
Steps:

Create a form component with two separate TextFieldElement components
The first TextFieldElement component should be disabled, however the value provided in this disabled field is essential for the form to submit successfully
Edit the second TextFieldElement
Observe a failed response from the API

@chelssw, I just ran into this. How did you resolve it?

this is the expected behaviour please read https://github.com/dohomi/react-hook-form-mui/issues/233#issuecomment-1949422629

@dohomi, got it. Thank you!

@dohomi, can we add a new prop that would apply disabled styles to material components but not disable the component in React Hook Form?

With the sx prop, I'm required to define my own styles rather than relying on the default styles provided by MUI when using the disabled prop. Additionally, to prevent users from altering the input value, I need to include InputProps={{readOnly: true}}
The above thing seems like a workaround, when the same behaviour can be acheived using the disabled prop.


Add Edge Processor support

Pull Request (PR) description
Adding support for installing/configuring/managing the Edge Processor from Splunk.
This Pull Request (PR) fixes the following issues
Fixes #388

Ok another annoying note is that the authentication token used here to connect the Edge Processor back to SCS expires after 5 minutes, so after initial deployment, you'll have to update the token again to deploy to additional servers or if they go offline for long enough. This feels like a design issue on Splunk's side, and I'm not sure if/how we want to handle that, or that kind of inflexibility invalidates the worth of using Puppet to manage/deploy Edge Processors. Thoughts?

Can you update the REFERENCE.md file by running bundle exec rake strings:generate:reference?
Then the actual test suite should run with all the version and OS matrix builds.


[SPARK-46493][INFRA] Upgrade apache-rat in the dev/check-license to 0.15

What changes were proposed in this pull request?
This ps upgraded apache-rat used in the dev/check-license from 0.14 to 0.15
Why are the changes needed?
This new version brings some bug fix:

RAT-309 : Upgrade Maven Reporting API to 3.1.1/Complete with Maven Reporting Impl 3.2.0
RAT-307:  Update to focal (Ubuntu 20.04) on Travis to circumvent build errors and be able to use more modern JDK versions. Deprecate openJDK8 build with focal as it is not supported on Travis.

The full release notes as follow:

https://creadur.apache.org/release-notes/RELEASE-NOTES-015.txt

Does this PR introduce any user-facing change?
No
How was this patch tested?
Pass GitHub Actions
Was this patch authored or co-authored using generative AI tooling?
No

Thanks @dongjoon-hyun


Update request: tribler 7.14.0 → 8.0.6

Package Information

Package name: tribler
Latest released version: 8.0.6
Current version on the unstable channel: 7.14.0
Current version on the stable/release channel: 7.14.0

Checklist

[x] Checked the nixpkgs pull requests

Notify maintainers
@xvapx
@mkg20001

Note for maintainers: Please tag this issue in your PR.

Add a :+1: reaction to issues you find important.

I tried it myself with this patch applied to current stable, but it gives me the following error:
$ tribler --help
********************************************************************************
A AttributeError occurred
********************************************************************************
Traceback (most recent call last):
  File "/nix/store/rs1b76w8bb1kwvddk9pgkgik4k2a71dz-tribler-8.0.6/src/run_tribler.py", line 64, in <module>
    from tribler.core.session import Session
  File "/nix/store/rs1b76w8bb1kwvddk9pgkgik4k2a71dz-tribler-8.0.6/src/tribler/core/session.py", line 29, in <module>
    from tribler.core.libtorrent.download_manager.download_manager import DownloadManager
  File "/nix/store/rs1b76w8bb1kwvddk9pgkgik4k2a71dz-tribler-8.0.6/src/tribler/core/libtorrent/download_manager/download_manager.py", line 53, in <module>
    lt.create_ut_metadata_plugin,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'libtorrent' has no attribute 'create_ut_metadata_plugin'

********************************************************************************
Error while showing a message box: [Errno 2] No such file or directory: 'xmessage'


fix bug where preload("./thing") would become preload("res://./thing")

probably should add tests for this or something

a oops bad base branch


Weight drop code masking the same "raw" weight?

Hey,
I was inspecting the weight drop (variant of dropconnect) code and I found it a bit confusing (https://github.com/salesforce/awd-lstm-lm/blob/master/weight_drop.py#L34):
for name_w in self.weights:
      raw_w = getattr(self.module, name_w + '_raw')
      w = None
      if self.variational:
          mask = torch.autograd.Variable(torch.ones(raw_w.size(0), 1))
          if raw_w.is_cuda: mask = mask.cuda()
          mask = torch.nn.functional.dropout(mask, p=self.dropout, training=True)
          w = mask.expand_as(raw_w) * raw_w
      else:
          w = torch.nn.functional.dropout(raw_w, p=self.dropout, training=self.training)
      setattr(self.module, name_w, w)

In every iteration the raw_w you get from name_w + '_raw' is the same, isn't it? Because you only setattr to name_w (e.g. weight_hh_l0) at the end. So every time the dropout mask operates on the same raw weight matrix...
Or maybe I just overlooked something. Can someone help me understand this?
Thanks!

Hey! ^_^ You're correct locally but missing a global point :)
Locally, the weight drop code you're looking at doesn't modify the raw weight raw_w.
Globally however the raw weight raw_w is being modified - it's being updated by normal SGD.
In the training loop, we run the forward pass, which sets a new dropped out weight, and calculates a loss. When we call loss.backward() we calculate gradients for all our weights, including the raw weight raw_w which is used to create the dropped out weight w. Then we apply the update, usually an SGD step, which modifies raw_w.
As such, weight drop operates on the same raw weight raw_w each time but the values in that weight change during training.
Hope that helps!

Ah, missed that (not really familiar with pytorch parameter setting). So just to double check, when doing the computation (e.g. Wx+b) in forward direction, the weight used is w (masked), but when updating/learning, the weight got changed is raw_w since it's registered?
Thanks for the prompt reply!

Correct. The masked / dropped out weight w is only a temporary result of an operation on the raw weight raw_w so it's what is modified when backprop is applied :)

@Smerity @jerrybai1995 I'd just like to check my understanding on DropConnect. At testing time, so we scale the weights by probability p like in normal dropout?


build: fix morphlines build, enable building on JDK 11

This PR includes a morphlines build fix and a couple of changes to enable building on JDK 11, including an upgrade of the Thrift dependency to 0.13.

I know it says the build failed but it's just flaky tests and PMD warnings, so this is a big improvement over straight-up build failure.

LGTM, +1!
Thank you for the patch, @mpercy .
Do we also want to bump java version or just prepare / allow for it?

Hey @bessbd, thanks for the quick review! I'm fine with bumping the Java version but let's do that in a separate PR, since this one is more of a break-fix.


Allow attributes to be set via constructors

This PR supersedes #7 and allows setting all frame attributes via constructors. The only unusual thing in this PR might be that mixin arguments (and flags) are provided as keyword arguments only. This has been done as the combination of mixins and positional arguments tends to be quite confusing.
An alternative would be to repeat all arguments in each constructor, but I found this to be quite verbose.

This is great, thanks! :cake: :sparkles: :cake:


Regenerate images in documentation which have akka references

Can't remember precisely where but there are images in the current pekko Paradox docs which refer to Akka. Some examples I can remember are a visalized flamegraph and also a screenshot of a http webserver that still has Akka in it.
We should regenerate the screenshots so that they have Pekko naming instead and update the docs to reflect this.

E.g. here but unlikely to be reproducible:
https://nightlies.apache.org/pekko/docs/pekko-http/main-snapshot/docs/handling-blocking-operations-in-pekko-http-routes.html

E.g. here but unlikely to be reproducible:
https://nightlies.apache.org/pekko/docs/pekko-http/main-snapshot/docs/handling-blocking-operations-in-pekko-http-routes.html

For cases like this we could just probably blur the akka?

I guess I would mostly just ignore it for now.

I guess I would mostly just ignore it for now.

I did a very quick search and there isn't even an Akka trademark that is actually associated with the project so I think its quite safe to ignore and if someone complains (plus its valid) we can just blur it


Add clarifying use case for why the TraceContext codec is part of the standard

Small proposed addition to explicitly clarify why a TraceContext codec is required in the standard.
It calls out the obvious-in-retrospect case of needing to keep middleware generic that I hadn't been considering when initially trying to reason why the codec wasn't an implementation detail!

:ship:

@bcronin I still can't see the need for the codec in the application code.
Can you provide an example where application code needs to use this codec API?

An artificial, specific example would be this:
Alice wants to write a new open source, Thrift-like remote procedural call library. Among the protocols her library is built on are web sockets (streaming binary) and SSE (text-only). She wants to provide to use the OpenTracing API so consumers of her library get information-rich traces by using her library. She does not want to bind her library to any particular OpenTracing implementation; i.e. tracing data about what happens in her library should be there whether Zipkin, AppDash, or some tracer she’s never heard of it being used. However, since it is an RPC library, she needs some way to encode/serialize/marshal the context of the current trace on one side of the RPC and then decode/deserialize/unmarshal it on the other side of the RPC. She really does not know (or want to) concern herself with whether that “context” is just a simple TraceID int or a more complex set of parameters that the implementation wants to get across the wire to allow its approach to tracing to work. She uses the text codec for when she’s using SSE and uses the binary for everything else with assumption the binary form is more efficient.

@bcronin, my misunderstanding to this has been based on my interpretation of what serialisation entails, and therefore my concerns amount to nothing more than poor naming to this "codec" part of the proposed API.
Serialisation is the writing of bytes or characters into streams/buffers for the sake of storage or cross-process communication.
While serialisation is obviously a consequence to this behind the scenes, it's not actually what the user cares about here, and therefore it's not intuitive API.
What this is really about is the transforming the state from the protocol's object to the tracing's context. There's no direct writing to bytes or characters, no writing to buffers or streams, no dealing with codecs.
While some protocol middleware frameworks will expose their underlying streams/buffers, and you'll be able to use the API's encoder/decoder to it, many won't and you'll be left having to transform objects from what the middleware provides into the OpenTracing's Span/TraceContext.
I've written these responses already in https://github.com/opentracing/opentracing.github.io/pull/34/files#r50616999 and https://github.com/opentracing/opentracing-java/pull/7/files#r50617464


C++17  returns access denied regardless of capabilites

I am not sure if this is intended but creating a 'Blank App (c++/WinRT)' in VS 2019 and trying something as simple as the below will always gives access denied. Is is that only app dir and local are supported for std:: ?
        std::filesystem::path file = LR"(C:\Users\name\Pictures\1.png)";
        auto t = std::filesystem::is_regular_file(file);

This sounds like a great question for Stack Overflow. 😉


Wrapper

created a small wrapper around the push cordova plugin, doesn't bring much in terms of API but keeps stuff consistent.
$fh.push(onNotification, success, fail);

@wei-lee Could you give it a spin?

Reviewed. Looks good.

:+1:


Enable Numlock Tweek is not working.

I am using a laptop..so I apply laptop tweeks, but Enable Numlock Tweek is not working. It is very handy for people with Numpad to type  login passcode.
Plz look into this.
Btw love this. U are Amazing

Unable to replicate. The enable and disable are done via registry key. There is other spots this can be disabled or enabled on a hardware level. Closing issue.


How to include quickchart-js using google app script

I'm developing something through google apps script and want to create charts by quickchart, how can I include quickchart library ? Thanks

HI @petertalkman!  In Google Apps Script, it's probably easiest to construct the QuickChart URL manually.  You don't need quickchart-js for this.
For example:
function GetChartUrl(values) {
  console.log('Values:', values);

  var width = 500;
  var height = 300;
  var backgroundColor = 'white';
  var config = `{
  type: 'bar',
  data: {
    labels: ['Q1', 'Q2', 'Q3', 'Q4'],
    datasets: [{
      label: 'Data',
      data: [${values.join(',')}]
    }]
  }
}
`;
  return `https://quickchart.io/chart?c=${encodeURIComponent(config)}&w=${width}&h=${height}&bkg=${backgroundColor}&devicePixelRatio=1`
}

And the formula in Google Sheets:
=GetChartUrl(A2:A6)

or, to display an image:
=IMAGE(GetChartUrl(A$2:A$5))

Here's an example sheet that generates a chart URL: https://docs.google.com/spreadsheets/d/1cOjoT4viETplmdTvNOeDKVjwIqZpIr2afMCiK7vgQLY/edit#gid=0


Migrate cellfinder into this package

See https://github.com/brainglobe/BrainGlobe/issues/45
Moves the existing cellfinder workflow into this package. Also then restructures the repository so that we can package the workflows without packaging the benchmarks and test data, to avoid users obtaining a bloated install.
To the reviewer:
Key info to check is in the README and pyproject. The remaining 6000-lines or so are just the new inclusion of what is currently in the cellfinder package.
On Merge:

Tag brainglobe-workflows version 1
Push to PyPI again

TODO List:

[x] Update the missing links once the website is ready
[x] Choose new name for cellfinder CLI tool and give it a temporary cellfinder alias
[x] Ensure that ASV benchmarks are still working properly (didn't break any of @sfmig's stuff :relieved: )
[x] Ensure CI is passing (except CodeCov, but that's more an existing cellfinder problem)
[x] ~Move Docker API secrets into this repo to allow for deployment (if we still want this?)~ Purge Docker images
[x] Update README content and move old cellfinder content to somewhere appropriate on the website.

@alessandrofelder Have addressed the things you raised - thanks for catching them!
For the napari backend, I've set to using pyqt to be consistent with brainreg for the time being, until https://github.com/brainglobe/BrainGlobe/issues/53 is taken further.
Tests seem to be passing but will take ~an hour to complete


Language server is not running for: objc

Hi
I'm trying to install coc-clangd on a macOS system (Catalina version 10.15.7), but got this error while install clangd through CocComand clangd.install:
[coc.nvim] Downloading clangd-mac-11.0.0.zip...
[coc.nvim] Extracting clangd-mac-11.0.0.zip...
client coc stopped!
starting coc.nvim service
[coc.nvim] imselect observer exit with code 129
Press ENTER or type command to continue

And the Language server cannot be started:
Language server is not running for: objc
Could you please give some clues how to correct it, thank you very much.

Do you have ~/.config/coc/extensions/coc-clangd-data/install/11.0.0/clangd_11.0.0/bin/clangd exist? Checkout:
~/.config/coc/extensions/coc-clangd-data/install/11.0.0/clangd_11.0.0/bin/clangd --version

imselect observer exit with code 129

this error is not from coc-clangd, are you using coc-imselect?

Hi, thanks for your comments.
Yes I have clangd installed:
~/.config/coc/extensions/coc-clangd-data/install/11.0.0/clangd_11.0.0/bin/clangd --version
clangd version 11.0.0 (https://github.com/llvm/llvm-project 176249bd6732a8044d457092ed932768724a6f06)

After uninstall coc-imselect, the error disappeared,
[coc.nvim] Downloading clangd-mac-11.0.0.zip...                                                                                [coc.nvim] Extracting clangd-mac-11.0.0.zip... client coc stopped! starting coc.nvim service
but clangd service still cannot be started in neovim:
[LC] Language server is not running for: objc

[LC] Language server is not running for: objc

This error is came from https://github.com/autozimu/LanguageClient-neovim

Yes, It's an error from LanguageClient-neovim, I got it running now, thank you very much


$"columnName" not supported

Hi,
When trying to create new features in my DataFrame using $"columnName" pattern, the interpreter runs into an error. Is there any work-arround to make work except the use of the DataFrame name.
code example:
**
val df_v2 = df.withColumn("A_v2", myUDF($"A_v1"))**

weird I use that all the time what error did you for?

I'm getting the following error:
**error: value $ is not a member of StringContext
**

I'm pretty sure this is not at all notebook related. please look at the examples first.
I feel like you again need some import:
import sqlContext.implicits._
// only now  the $"columnName" is available

@vidma you're right, I'm more familiar to Zeppelin where all these things works out of the box.
Thx!


Adding logger

With this change, users can provide a PyTorch Lightning logger object to the .train() method:
from pytorch_lightning.loggers import WandbLogger

wandb_logger = WandbLogger(project="my-project", name="run-name")

model.train(
    train_df=train_df,
    eval_df=eval_df,
    logger=wandb_logger
)

@versae Seems like this got integrated without the PR.
@Shivanandroy  Can you make a new release?

@versae My bad! Apologies. I didn't see the PR, I was not actively managing it for couple of months.
@eliasws It's already under pre-release. you can update simplet5 pip install -U simplet5

All good 🤠


Channel override is not working

Hello,
Whatever the channel I indicate, the message will be sent to the channel chosen when the Slack Webhook App was created. For instance:
slackr -w "https://hooks.slack.com/services/MY/WEBHOOK/URL" -r "#newtest" test_message
will post the message in #general channel because the webhook URL was created for the #general channel. Of course #newtest exists...

Hi there.
Please try with -r newtest (without #).
This also might be a permission issue. The created hook can have some fixed configuration.
Another thing you should try, is using the slack channel like ID for that channel. (eg.: -r C012345)
More info here: https://github.com/a-sync/slackr/wiki

Hello,
Thanks for the feedback! I've tried the channel name without a # as well as the channel ID, but the result is exactly the same. It does seem to me that it's a permission issue indeed... While creating the webhook, the Channel is mandatory, so I'm thinking that maybe Slack has changed something and it's not possible to post to a channel which is not associated with the webhook... Do you think that's possible? When using API, everything works fine.

Checked, and it still works for me.
I think the app/integration hook used might not be allowed to interact with that channel. You should contact an admin on that channel, or the slack support team, to get more details on the issue.
I'm closing this since it seems this is not a slackr issue.
Please feel free to share any upcoming details about the problem/solution.


Let me introduce how to improve performance easily.

koa's concept is really terrific.
I'm sure koa v2 + async/await will be the mainstream in the future.
but, I guess someone needs to use koa v1 for various reasons.
co-booster is a performance tuning version of co.
It's fully compatible with co. and, works fastly in many cases.
co is used in a core logic of koa v1 and koa-convert.
so, I believe it makes koa better without much effort.
Here are my results using koa's benchmark script. (100 middlewares)
- koa v1 + nodejs v4.4.7 : 11% better
- koa v1 + nodejs v6.9.1 : 13% better
- koa v2(legacy middleware) + nodejs v4.4.7 : 13% better
- koa v2(legacy middleware) + nodejs v6.9.1 : 14% better

I just wondered what author, contributors, and users think about.
I'd like to contribute to koa if I have a chance.

The numbers look good! Since co-booster is fully compatible with co however, what do you think about merging your changes into co instead?

Look good, I think co-booster and merge together will be good choice for the whole co solution.

I agree to merging co-booster into co. It depends on the decision of co's maintainers. because it can be a module that is not mature yet.
I tried a lot to confirm about the compatibility and performance. but, I think it should be checked more thoroughly because it is used by many projects.

@ifsnow Thats awesome, great work! I'm sure the people over at co can help with testing and validating the performance. One way to start the discussion would be to open a PR there 👍

@marvinhagemeister I'm so flattered. opened a PR in co. I hope it will pay off.

yes, you can make PRs to co. koa just uses that library, so you'll have to push changes there.
however, long term, we are using native await, so i'm not really interested in improving performance with generators.


Completed HTML & CSS

Added answers for CSS Positioning, CSS Selectors, and Build a Resume under the Language Skills/HTML & CSS course. They all check out on the site, and complete the HTML & CSS section of the repo completely. Hope this helps someone!

Great job!


[Mous Utilities] Inconsistent log folder name

Microsoft PowerToys version
0.49.1
Running as admin

[ ] Yes

Area(s) with issue?
Mouse Utilities
Steps to reproduce
Starting PT.
✔ Expected Behavior
Same main folder for settings and logs.
❌ Actual Behavior
Different folders for settings and logs.

Other Software
No response

I see a bigger issue than folders: Is it "Find my mouse" or "Mouse utiilities"?

"Mouse utilities" > "Find my mouse"
It should be a subfolder IMO.

Nice find. Settings seem to be saved on both folders. Need to patch some code to only use 1 of these.
Not sure the current settings infrastructure allows nested folders like "Mouse utilities" > "Find my mouse" but the idea here is that all mouse utilities will be different PowerToys, even if they're grouped in Settings under "Mouse utilities".

I don't know if the nested folders are needed. Creates very long paths and tiny (individual) files. Just think the folder name should be same as what UI says. But then that should also apply to "powerlauncher" and "powerpreview".

This is fixed in 0.51. Please head over to our releases and get the update! https://aka.ms/installpowertoys


Add lab to measurements table

In GitLab by @nwalczak on Aug 26, 2019, 11:35
We need a way to define the lab performing the measurements, for the experiment id.  Right now, we will add this as a single row at the top of the table that spans the whole table.
We can also remove the experiment_id definition from the run list, as it is at the top level now.

In GitLab by @nwalczak on Sep 4, 2019, 10:15
created branch 95-add-lab-to-measurements-table

In GitLab by @nwalczak on Sep 4, 2019, 10:15
mentioned in merge request !45

In GitLab by @nwalczak on Sep 5, 2019, 10:26
closed via merge request !45

In GitLab by @nwalczak on Sep 5, 2019, 10:26
closed via commit 9404bde6166c646e0de8b154d5a6e7c9760f9f69

In GitLab by @nwalczak on Sep 16, 2019, 11:47
mentioned in commit 9404bde6166c646e0de8b154d5a6e7c9760f9f69


Fix met-8.1 to compile using GNU 6.3.0 and later.

SNAT attempted to compile met-8.1 in /usr/local/met-8.1 but was unable to.
See: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=90507
The Debian stretch release includes GNU 6.3.0 and Debian Buster release has GNU 8.x.
Howard Soh found that even when met-8.1 can be made to compile on 6.3.0 there are still runtime errors!  This task is to get MET compiling on the Debian stretch and buster releases and make sure the unit test output matches the output generated by GNU 4.9.2 (i.e. dakota).
Debian buster is available for testing on k15.rap.ucar.edu.

I made a corresponding branch from the master_v8.1 bugfix branch:
https://github.com/NCAR/MET/tree/bugfix_1139_GNU
And I'm testing in these locations:
GNU 6.3.0 on mohawk: /d2/projects/MET/MET_releases
GNU 8.3.0 on k15: /d2/MET/MET_releases
I've committed 3 changes to that bugfix branch so far:
(1) Update data_line.cc for GNU 8.3.0 compilation error by changing sstream to sstream.str().
(2) Update enum_to_string.cc for GNU 6.3.0 to avoid seg fault.  Need to allocate (n+1) bytes instead of (n).
(3) Update structure of Makefile.am for plot_mode_field.  This is the only example of an application which builds a library and compiles applications.  In 6.3.0 and earlier, the Makefile produced by autoconf compiled the libraries followed by the applications:
mohawk's Makefile:  all-am: Makefile $(LIBRARIES) $(PROGRAMS)
In 8.3.0, the order is swapped in that Makefile:
k15:s Makefile:        all-am: Makefile $(PROGRAMS) $(LIBRARIES)
To fix this, I got rid of the vx_cgraph library from Makefile.am and instead just linked to the object files directly.
These 3 changes enable MET to compile on mohawk and k15 but there are still runtime errors.

make test errors out immediately:
*** Running ASCII2NC to reformat ASCII point observations into NetCDF ***
../src/tools/other/ascii2nc/ascii2nc
../data/sample_obs/ascii/sample_ascii_obs.txt
../out/ascii2nc/sample_ascii.nc
-v 2
ERROR  :
ERROR  : CommandLine::is_switch(const char *) const -> empty string!
ERROR  :

I updated the CommandLine class to use strings instead of character arrays, fixed the downstream ripple effects, and got MET to compile on both mohawk and k15.  Running the full set of unit tests on mohawk required...

copying over the input "unit_test" directory (41GB)
installing the PERL XML/Parser module.
manually settings MET_TEST_RSCRIPT

I ran into 2 random failures during the unit tests.  Both went away after rerunning (which is worrisome).  Both had the same error message when reading MET-formatted NetCDF files:
TEST: gen_vx_mask_POLY_SYMDIFF        - FAIL -   0.170 sec
terminate called after throwing an instance of 'netCDF::exceptions::NcEdge'
what():  NetCDF: Start+count exceeds dimension bound
file: ncVar.cpp  line:1614
Aborted
TEST: plot_data_plane_NC_MET                         - FAIL -   0.124 sec
terminate called after throwing an instance of 'netCDF::exceptions::NcEdge'
what():  NetCDF: Start+count exceeds dimension bound
file: ncVar.cpp  line:1614
Aborted

Another runtime error, but this time repeatable.  Problem when parsing tc_stat job command options.  Updated code to use a string instead of a character pointer.

Updated met_file.cc to search for lat/lon dimensions using strings instead of const char * in the hopes of fixing the intermittent netCDF::exceptions::NcEdge runtime error.

Charge 2702691

Making somewhat slow but steady progress.  Working on mohawk (gnu 6.3.0) and k2 (gnu 8.3.0).
All unit tests now run on mohawk.
Committed fix in hopes of getting all to run on k2.

After merging the changes for this bugfix into develop and master_v8.1, the regression tests successfully ran.  However, there is a sporadic, non-repeatable failure occurring on mohawk which occurs when writing NetCDF output files.  The most recent instance was from gen_vx_mask and is listed below.  This might be a memory problem, perhaps caused by an uninitialized variables somewhere.  Will try compiling with Intel's -ftrapuv option to look for uninitialized variables.
/d2/projects/MET/MET_development/MET/met/share/met/../../bin/gen_vx_mask
/d2/projects/MET/MET_development/MET/test_output/gen_vx_mask/DATA_APCP_24_mask.nc
/d2/projects/MET/MET_development/MET/met/share/met/poly/LMV.poly
/d2/projects/MET/MET_development/MET/test_output/gen_vx_mask/POLY_PASS_THRU_APCP_24_LMV_mask.nc
-type poly -value 10 -v 2
DEBUG 1: Input File:            /d2/projects/MET/MET_development/MET/test_output/gen_vx_mask/DATA_APCP_24_mask.nc
DEBUG 1: Mask File:             /d2/projects/MET/MET_development/MET/met/share/met/poly/LMV.poly
terminate called after throwing an instance of 'netCDF::exceptions::NcEdge'
what():  NetCDF: Start+count exceeds dimension bound
file: ncVar.cpp  line:1614
Aborted

Merged changes from this branch into both master_v8.1 and develop.  Tested master_v8.1 on both mohawk (GNU 6.3.0) and k15 (GNU 8.3.0).  Am also testing develop on them but that's independent of this issue.  Will create a separate issue for sporadic runtime error.


Update python3Packages.apache-airflow >= 1.10.13

A few securiity vulnerabilities have been discovered in Apache Airflow before 1.10.13:

CVE-2020-17513: Apache Airflow Server-Side Request Forgery (SSRF) in Charts & Query View (Kaxil Naik<EMAIL_ADDRESS>https://www.openwall.com/lists/oss-security/2020/12/11/2
2020/12/11 #3: CVE-2020-17511: Apache Airflow Admin password gets logged in plain text (Kaxil Naik<EMAIL_ADDRESS>https://www.openwall.com/lists/oss-security/2020/12/11/3
2020/12/11 #2: CVE-2020-17515: Apache Airflow Reflected XSS via Origin Parameter (Kaxil Naik<EMAIL_ADDRESS>https://www.openwall.com/lists/oss-security/2020/12/11/4

@bhipple @costrouc @ingenieroariel @drewrisinger

Almost done with this, though not maintainer. Had to add several packages. Since I'm not the maintainer of apache-airflow (and honestly never have/will use it, just fixed it once b/c it was erroring some of my PRs), I don't really want to be responsible for maintaining its dependencies...

We have 2.1.2 in master now.


publsish jib-cli as maven artifacts

currently jib-cli is only distributed as jre bundle which is nice, but tedious and duplicates both the JDK and the jars I already have on my system.
could jib-cli be published to maven central so one could use tool like jbang to run it like: jbang com.google.cloud.tools:jib-cli:RELEASE or just do jbang app install --name jib com.google.cloud.tools:jib-core and then just use jib directly.

Thanks for your interest in this! We're focusing on bug fixes and platform evolution changes and while it's a good idea, it's not something we can prioritize at this time (unfortunately). Closing as not planned.


why model_serialization.strip_prefix_if_present not work when train multi gpu

❓ Questions and Help
model_serialization.strip_prefix_if_present  remove the  'module.' prefix for each tensor in checkpoint,
i found it not work on multi gpu train, and fine on single gpu train( do not use torch.distributed.launch)
i want to finetune my model, so i should prevent some layer which depends on num_classes to restore from checkpoint.

Can you explain a bit better why it doesn't work? It used to work when I wrote it.

oh, reply so quickly.
single gpu:
2019-02-14 17:29:28,382 maskrcnn_benchmark.utils.model_serialization INFO: backbone.body.layer1.0.bn1.bias                  loaded from backbone.body.layer1.0.bn1.bias                  of shape (64,) 2019-02-14 17:29:28,382 maskrcnn_benchmark.utils.model_serialization INFO: backbone.body.layer1.0.bn1.running_mean          loaded from backbone.body.layer1.0.bn1.running_mean          of shape (64,)
multi gpu:
2019-02-14 17:29:28,382 maskrcnn_benchmark.utils.model_serialization INFO: module.backbone.body.layer1.0.bn1.bias                  loaded from backbone.body.layer1.0.bn1.bias                  of shape (64,) 2019-02-14 17:29:28,382 maskrcnn_benchmark.utils.model_serialization INFO: module.backbone.body.layer1.0.bn1.running_mean          loaded from backbone.body.layer1.0.bn1.running_mean          of shape (64,) 2019-02-14 17:29:28,382 maskrcnn_benchmark.utils.model_serialization INFO: module.backbone.body.layer1.0.bn1.running_var           loaded from backbone.body.layer1.0.bn1.running_var           of shape (64,) 2019-02-14 17:29:28,382 maskrcnn_benchmark.utils.model_serialization INFO: module.backbone.body.layer1.0.bn1.weight                loaded from backbone.body.layer1.0.bn1.weight                of shape (64,) 2019-02-14 17:29:28,383 maskrcnn_benchmark.utils.model_serialization INFO: module.backbone.body.layer1.0.bn2.bias                  loaded from backbone.body.layer1.0.bn2.bias                  of shape (64,)
all tensor name begin with 'module.'

i fix my code like this, at model_serialization.py  line 50
        if is_training and (key.startswith('roi_heads.box.predictor.cls_score') or key.startswith(                 'roi_heads.box.predictor.bbox_pred') or key.startswith('module.roi_heads.box.predictor.cls_score') or key.startswith(                 'module.roi_heads.box.predictor.bbox_pred')):             logger.info('ignore ' + key)             continue

Yes, we strip the .module prefix, but in https://github.com/facebookresearch/maskrcnn-benchmark/blob/13b4f82efd953276b24ce01f0fd1cd08f94fbaf8/maskrcnn_benchmark/utils/model_serialization.py#L12-L23
we align the state dict with the parameters that have been loaded.
I don't know what exactly is your use-case, but for all the models that we have currently the combination works fine.

emm,all i want to do is finetune model with different num_classes, i want to skip the roi_heads.box.predictor.cls_score and roi_heads.box.predictor.bbox_pred  layers, so i add code
if  (key.startswith("roi_heads.box.predictor.cls_score") or
key.startswith( "roi_heads.box.predictor.bbox_pred") or key.startswith('module.roi_heads.box.predictor.cls_score') or
key.startswith( "module.roi_heads.box.predictor.bbox_pred")):
  logger.info('ignore ' + key)
  continue
at here https://github.com/facebookresearch/maskrcnn-benchmark/blob/13b4f82efd953276b24ce01f0fd1cd08f94fbaf8/maskrcnn_benchmark/utils/model_serialization.py#L48
i add  last 2 "or"，because the prefix 'module.' not removed when train multi gpu

@kakaluote in this case, just remove those entries from the serialized state-dict, as discussed in https://github.com/facebookresearch/maskrcnn-benchmark#finetuning-from-detectron-weights-on-custom-datasets

great

Cool, I'm closing this issue then, but let me know if you have further questions


[3.x] Godot Physics AreaSW and Area2DSW: fix premature return in call_queries

The call_queries method (of AreaSW and of Area2DSW) does two things: one for monitored bodies and one for monitored areas. However, if the null check in the part about bodies fails, then the method returned, and hence skipped the part about areas (which is an independent part).
This PR fixes the premature return, by bringing the structure of the code in sync with master (compare e.g. GodotArea2D::call_queries() in master). Hence this PR is only for 3.x and not relevant for master.

Thanks!

Cherry-picked for 3.4.4.


Use contextual link to Graph how-to

Hi @OWinfreyATL, I've pushed one commit to update one left over link to be a contextual TOC link, keeping the reader in the IT admin docs.
For consideration - Should this link be moved to your "Tutorials" TOC node instead of the "Reference" TOC node?

#assign-reviewer: @OWinfreyATL

Hi @OWinfreyATL, I've pushed one commit to update one left over link to be a contextual TOC link, keeping the reader in the IT admin docs.
For consideration - Should this link be moved to your "Tutorials" TOC node instead of the "Reference" TOC node?

Hey Faith,
I think moving that to the tutorial node would be a good move :)
I'll take care of that in another PR today :) Thanks!

#sign-off

@FaithOmbongi, @OWinfreyATL
This TOC update should be submitted in the private repo so that it can be tested on staging.

Here's some info about working in the private vs. public repo:
Microsoft authors and contributors need to make content contributions through the private repository so the content can be staged and validated by the current validation rules.
After you make your changes in the private repo, review the articles on staging, and fix any validation issues, you can add the sign-off comment to let PR reviewers know that the updates are ready to be merged.
Read about authors working in the public repo for more information.
If you need help getting set up to work in the private repo, see Set up Git repository locally for documentation.
We'll close this PR. Thank you.


[usbdev,dv] correction required in smoke test

This PR contains a little amendment to the USBdev smoke test. Before checking the integrity of 'in_transaction' we need to restore the data packet to its original state.

@alees24 @rswarbrick can you look at it.


Upgrade to Urql 2

Upgrading the dependency is needed. Types are broken when upgrading to Urql 2.0 but I do not believe any changes to the library are necessary.

Hey, it looks like just depending in URQL 2.0 is all that is needed. Very nice by work by the URQL team. Could you checkout PR #11 and see if it works for you too? :) Thanks for your help!

Yep, that did the trick.

Released as 0.1.5


Selection Sort in Java

I would to add Selection Sort in Java. This is part of the Hacktoberfest 2021.

Put it in DSA/DSA-Java/Sorting-Algo/.. folder.


How about the inference accuracy

Hi,
great work. I'm also trying to use yolov3 in openvino. Have you checked the inference accuracy for the converted yolov3 model? I trained my own dataset with new model(based on the structure of yolov3). It works fine in the darknet, but the inference accuracy drops a lot. I found that the conversion from darknet to tensorflow may have some problems. The converted tensorflow model performs badly for inference, the accuracy drops a lot.

BTW, I use https://github.com/mystic123/tensorflow-yolo-v3.git

Hi! I also tried the regular yolo v3 on a intel compute stick 1, by following the guide for creating the .pb file, and then using this compile command:
mo_tf.py --input_model yolo_v3.pb --tensorflow_use_custom_operations_config yolo_v3.json --input_shape "(1,413,413,3)" --data_type=FP16

I also compile it without the --data_type=FP16 and ran it on the CPU.
There is a difference in accuracy for sure, especially in the confidence scores. for example, i saw a difference with "sports ball" of 98% on fp32 vs 54% on fp16. Also, the bounding box was less accurate with fp16, but still ok. Some fp16 detections are rather around 10%, so definitely I would say that it is really different depening on  where you will be doing the inference on!

Are you all using https://github.com/mystic123/tensorflow-yolo-v3 to convert from Darknet to IR? There are a few open issues that may explain the accuracy issues ( https://github.com/mystic123/tensorflow-yolo-v3/issues )
Have you tried another way to convert Darknet?
Cheers,
nikos

Hello everyone.
I solved the problem of low precision.
There was a mistake in the logic of preprocessing and postprocessing.

I meet the same problem. Have your modified the code of "openvino_tiny-yolov3_test.py" ?  As my weights file has a good performence on cpu, but when comes to RaspberryPi with a Intel Neural Compute Stick v1, the accurracy is pretty slow.
Still, thanks for your work!

Hello everyone.
I solved the problem of low precision.
There was a mistake in the logic of preprocessing and postprocessing.

Hi thanks for your work! How to fix this "logic of preprocessing and postprocessing" bug?

Have you really sovled this problem, someone says it is the resize of darknet is letterbox, but it has no this operation in openvino, I have no idea how to solve it.

Have you really sovled this problem, someone says it is the resize of darknet is letterbox, but it has no this operation in openvino, I have no idea how to solve it.

Yes, I used letter-box to resize after reading darknet's source code in the inference. But I haven't looked up the postporocessing code. Maybe you have to be the same with that when interface.

@Jucjiaswiss after use the letter-box resize ,have you solved it ?


Adding picamera to install instructions

Coverage remained the same at 81.985% when pulling 8f61700ea439dc64131ae0c66a536ae59ce65d95 on mtlynch:picamera-readme into a562f1fc73b70be93c1761141b3223a2929096c0 on JeetShetty:master.


[OpenCL] Fixes device name comparison stage_op_test

Changes the fixed '/device:GPU:0' expected device name string to the name returned by 'test/gpu_device_name()', as the device name could be '/device:SYCL:0' or '/device:GPU:0'.
Resubmission of #10682

Can one of the admins verify this patch?

@tensorflow-jenkins test this please

@jwlawson any luck with the test failure?

Jenkins, test this please.


JJ might be interesting to explore for ui

See https://github.com/martinvonz/jj
it has much more powerful primitive, better defaults and still compatible with git.

Ty for the input!
I had a look around, but unsure of the implementation details of going there. Or benefits.
gitu is already pretty tightly integrated with git specifically. Not ruling it out for the future!


[BUG] cythonize crashes if pyx file contains unmatched string

Describe the bug
Running cybug.py below leads to an infinite loop with unbounded memory growth until the OS kills it. (Run at your own risk.)
Traceback when interrupting:
^CTraceback (most recent call last):
  File "/Users/dion/codes/blocky/cybug.py", line 4, in <module>
    cythonize(Extension("*", ["cybug.pyx"], ))
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 990, in cythonize
    module_list, module_metadata = create_extension_list(
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 839, in create_extension_list
    kwds = deps.distutils_info(file, aliases, base).values
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 691, in distutils_info
    return (self.transitive_merge(filename, self.distutils_info0, DistutilsInfo.merge)
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 700, in transitive_merge
    return self.transitive_merge_helper(
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 706, in transitive_merge_helper
    deps = extract(node)
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 669, in distutils_info0
    info = self.parse_dependencies(filename)[3]
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 530, in parse_dependencies
    return parse_dependencies(source_filename)
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Utils.py", line 90, in wrapper
    res = cache[args] = f(*args)
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 493, in parse_dependencies
    source, literals = strip_string_literals(source)
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 361, in strip_string_literals
    label = "%s%s_" % (prefix, counter)
KeyboardInterrupt

Code to reproduce the behaviour:
cybug.pyx
cdef foo():
   """A docstring with an extra quote at the end.""""
    pass

def bar():
    """A well-formed docstring."""
    # a comment in the prime of its years
    pass

cybug.py
from Cython.Build import cythonize
from setuptools.extension import Extension

cythonize(Extension("*", ["cybug.pyx"], ))

Expected behaviour
A helpful exception, such as the one that I get when removing the bar function:
Compiling cybug.pyx because it changed.
[1/1] Cythonizing cybug.pyx
/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /Users/dion/codes/blocky/cybug.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

Error compiling Cython file:
------------------------------------------------------------
...
cdef foo():
   """A docstring with an extra quote at the end.""""
                                                     ^
------------------------------------------------------------

cybug.pyx:2:53: Unclosed string literal
Traceback (most recent call last):
  File "/Users/dion/codes/blocky/cybug.py", line 4, in <module>
    cythonize(Extension("*", ["cybug.pyx"], ))
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
    cythonize_one(*args)
  File "/Users/dion/.virtualenvs/tempenv-6981144277dbb/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: cybug.pyx

OS
macOS
Python version
3.11
Cython version
3.0.0
Additional context
No response

wow, this got me.
still happens with 3.0.11, glad I found this issue :)

This was fixed in the master branch in a8a2d41d7799b485b829bb95c36b4dacbeba5173.
I suspect it's enough of a corner case that we probably shouldn't backport it.


Should we adopt .map, .flatMap terminology?

Right now we use .then, .catch, .recover, and .always. Should we adopt more functional terminology, such as .map, .flatMap, .mapError, etc? This would mean less overloading.

I vote for .map, .flatMap, etc.

I think you spelled out the pros and cons very well.


Mixin Proposal: Immersive Engineering

Target Mod
Immersive Engineering
Mixin Functionality
Reimplementation of ASM tweaks from PFAA-Tweaks 1.2
Change Rationale
Unifying the Tweaks libraries

Implemented


Update HardwareCompatList.md

Fixed link to hardware platform selection document.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

windows-iotcore/learn-about-hardware/HardwareCompatList.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Multiple search box querying

Search box querying now does not work properly when attempting to search using both search boxes. Javascript logic needs to be rewritten and/or other methods to solve this.

4305e75 should fix this issue.


How to generate new models?

if I move other models from waifu2x, they are missing param files.
Any ideas?

param and bin file are the ncnn models. they are converted from caffe prototxt and caffemodel
see ncnn wiki for more info
https://github.com/Tencent/ncnn/wiki/how-to-use-ncnn-with-alexnet


az storage blob upload - early fail on overwrite error

It is quite reasonable that the tool reports an error at the start of the upload. That is the primary use case. It is very unexpected that the file will be removed during the upload. More likely the user is uploading a blob and is unaware of that it already exists. It is therefore better not to waste resources on uploading data that will be discarded.
An example:
trainer:/workdir/model# az storage blob upload -c models --file model.onnx --name p11808/model.onnx
Finished[#############################################################]  100.0000%
The specified blob already exists.
RequestId:1401d725-501e-0046-56b1-1e54bb000000
Time:2023-01-02T13:54:11.9826631Z
ErrorCode:BlobAlreadyExists
If you want to overwrite the existing one, please add --overwrite in your command.
trainer:/workdir/model#

@evelyn-ys for awareness

I do not know how you determine the labels, but this is not a "question" in the ordinary way I would think of what is a product question. This is straight-up a feature request.


Fix small font-sizes

When rendered you see font-size:0px; or 1px everywhere, that increases spam score that may affect mail delivery.
Thanks!

Hi !
Maybe you are wrong, please re-create your issue in issues section https://github.com/mjmlio/mjml/issues.
Thanks.


Remove dead code for handling azure

Codecov Report
Base: 43.90% // Head: 43.59% // Decreases project coverage by -0.30% :warning:

Coverage data is based on head (d836f9d) compared to base (4cbf469).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #70      +/-   ##
==========================================
- Coverage   43.90%   43.59%   -0.31%
==========================================
  Files          24       24
  Lines        1624     1617       -7
==========================================
- Hits          713      705       -8
- Misses        911      912       +1

Impacted Files
Coverage Δ

openqabot/types/incident.py
95.58% <ø> (-1.75%)
:arrow_down:

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Cannot read property '_isDestroyed' of undefined"

Version
2.6.10
Reproduction link
https://github.com/Ystr4/is_destroyed_error
Steps to reproduce
To get the error, click on button: "doesn't work", a few times.
What is expected?
To get an error if a component fails to render
What is actually happening?
Trying to cleanup something that doesn't exist

Hi,
I'm rewriting an old barebones javascript frontend using Vue.js.
Allot of the content of the site is created with a custom tool which outputs an array of objects for the nodes.
I'm using render functions to build the HTML templates out of that. Some of the components have allot of logic in them and are just container around simple html elements.
This seems to be working fine for most template, but on some of the templates I get this error in the destroy cycle when the :key gets updated (i.e load a different template).
Depending where i put the :key i get different error messages but they are all duo to the instance being undefined.
Does this have something to do with how I create the parent/child hierarchy by assigning directly to children on the VNode, or mixing functional components with non functional?
Any suggestions are welcome. Cheers.

Hey, this is too much for a repro. Can you provide a boiled down without all the custom format data and showing only the part that creates the bug? You can also use https://codesandbox.io/s/vue to share it quicker

Hi, thanks for the quick response.
I boiled it down some more, I hope this version you can work with.
Changing where i put the :key seems to have an impact on the type of error message i get, but they are all duo to the instance being undefined.
Let me know if I can provide any more info.
Thanks

I gave it another look, you are manually setting children on a vnode instead of providing it as a 3rd argument when calling createElement:
    const child_L1 = createElement(
      context.props.tag,
      {
        key: context.props.createdAt, // L1 key
        props: {
          tag: "div"
        }
      },
      [
        createElement(context.props.tag, {
          // key: context.props.createdAt,     // L2 key
          props: {
            tag: "h1",
            text: context.props.value
          }
        })
      ]
    );

After doing that you also need to pass down the children in both components:
// non functional
createElement(this.tag, data, this.$slots.default);
// functional
createElement(context.props.tag, data, context.children);

You can find more about the syntax at https://vuejs.org/v2/guide/render-function.html

Great, that works,
I've been stuck on this for days. What was confusing to me was that the components actually showed up on the screen without any errors, only after an update cycle the error appeared.
I had to change some tings around. One component with a switch(functional without the context.children) decided which component to create, only returning a single VNode to add to the children[], don't really like that i have to map the children there as well, just to satisfy the API, but no errors now. Thanks for your time. Good day.


Error when trying to start spa in SSR mode

✗ yarn start:ssr
yarn run v1.16.0
$ node dist/ssr/server
Node server listening on http://localhost:4200
When I try to access it, I get this:
TypeError: You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
at subscribeTo (/Users/i867028/git/github/spartacus/dist/ssr/server.js:32456:15)
at subscribeToResult (/Users/i867028/git/github/spartacus/dist/ssr/server.js:32355:76)
at CatchSubscriber.error (/Users/i867028/git/github/spartacus/dist/ssr/server.js:35205:94)
at SwitchMapSubscriber.OuterSubscriber.notifyError (/Users/i867028/git/github/spartacus/dist/ssr/server.js:32325:26)
at InnerSubscriber._error (/Users/i867028/git/github/spartacus/dist/ssr/server.js:32386:21)
at InnerSubscriber.Subscriber.error (/Users/i867028/git/github/spartacus/dist/ssr/server.js:29247:18)
at CatchSubscriber.OuterSubscriber.notifyError (/Users/i867028/git/github/spartacus/dist/ssr/server.js:32325:26)
at InnerSubscriber._error (/Users/i867028/git/github/spartacus/dist/ssr/server.js:32386:21)
at InnerSubscriber.Subscriber.error (/Users/i867028/git/github/spartacus/dist/ssr/server.js:29247:18)
at Observable._subscribe (/Users/i867028/git/github/spartacus/dist/ssr/server.js:31333:117)

Gil creates ssr server and tries to repro

This was happening because the production backend endpoint wasn't properly configured. I've created a small document for SSR setup (PR above)


Python implementation

Please consider this python implementation

Hi Steve. Could you write it as a python class, rather than a simple file? Also  bear in mind is that I'll ask you to write another python script that uses that class and runs the tests, to make sure that there are no problems in the code.

Hi Doug,I have converted the file to python class and wrote another scripts that runs the tests.

You've converted the code into a class but your class has no state - it's just a container for the methods.
The class initialiser can provide the functionality of encode(), decode(), and recover_nearest() as follows:
class OpenLocationCode(object):
  def __init__(self, latitude=None, longitude=None, code_length=None,
               full_olc_code=None, partial_olc_code=None):

Check for valid combinations (below), making sure to throw an exception if you get too many/not enough/the wrong combination of arguments:

Initialised with lat and lng, that's basically encode() with the default length
Initialised with lat, lng and length are encode() with the specified length
Initialised with full_olc_code - needs to decode()
Initialised with a short code, lat and lng is recover_nearest()

For bonus points, you could define/throw different exceptions:

ArgumentError if the combination of arguments isn't any of the above
BadCodeError if the full or partial code isn't valid

Then, you would call it like:
a = OpenLocationCode(latitude=lat, longitude=lng)
b = OpenLocationCode(latitude=lat, longitude=lng, length=13)
c = OpenLocationCode(full_olc_code='8FVC9G8F+7X')
d = OpenLocationCode(parial_olc_code='8F+7X', latitude=lat, longitude=lng)

You should store the code and the coordinates in the class (as private attributes) and have methods to access them, say:
def getCode(self):
  """Returns the current full code."""

def getCodeLength(self):
  """Returns the length of the current code."""

def getCoordinates(self):
  """Returns the coordinates of the code area.

  Returns a list with [lat_sw, lng_sw, lat_ne, lng_ne].
  """

This way, you pretty much don't need any other methods to be public - not even isFull or isValid, because you can just try to create an object with it and catch the exception. Because of that, it'd be good to have a separation between the public and private methods, so could you add a "_" in front of all methods that aren't getCode, getCodeLength and getCoordinates? (If you want to expose isFull, isValid and isShort that's fine too. But the others, like decode() etc, don't need to be visible.)
Finally, and I know this is quite big already, but can you use the test data files in the test_data directory? Then if we ever need to add tests, we don't need to modify all the implementations.
Thanks,
Doug

I'm closing this request since there's been no response for so long.


Removed duplicate manifest for Python 3 version 3.8.0.

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?

[x] Does your manifest conform to the 1.0 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Per #12004.
Microsoft Reviewers: Open in CodeFlow

/azp run


npm install puppeteer fails on Ubuntu 18.04 LTS

Steps to reproduce
Tell us about your environment:

Puppeteer version: v5.3.0
Platform / OS version: Ubuntu 18.04 LTS
URLs (if applicable):
Node.js version: v8.10.0

What steps will reproduce the problem?
I try to install puppeteer on my Ubuntu 18.04 LTS instance using npm install puppeteer
Please include code that reproduces the issue.

npm install puppeteer

What is the expected result?
Install is successful
What happens instead?
unhandledPromiseRejectionWarning: /home/kekearif/meh/node_modules/puppeteer/lib/cjs/puppeteer/install.js:138
                    catch {
                          ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at download (/home/kekearif/meh/node_modules/puppeteer/install.js:35:7)
(node:11036) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11036) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
<EMAIL_ADDRESS>/home/kekearif/meh
└──<EMAIL_ADDRESS>extraneous

npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none was installed.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none was installed.
npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.

Having issues installing puppeteer on Ubuntu as noted above, some advice on how to fix this would be much appreciated! Thanks

The version of Node.js (8) is outdated.
Current puppeteer versions support "node": ">=10.18.1".

The version of Node.js (8) is outdated.
Current puppeteer versions support "node": ">=10.18.1".
node: 14.15.1 same issue

node: 14.15.1 same issue

SyntaxError: Unexpected token { means Node cannot parse puppeteer's code in order to evaluate it. It would only happen on Node 8 and older releases, as they do not support a lot of the newer syntax puppeteer uses.
Node 14.15.1 understands current puppeteer's code, so you might be experiencing a different issue or actually running an older Node version (node -v).

node: 14.15.1 same issue

SyntaxError: Unexpected token { means Node cannot parse puppeteer's code in order to evaluate it. It would only happen on Node 8 and older releases, as they do not support a lot of the newer syntax puppeteer uses.
Node 14.15.1 understands current puppeteer's code, so you might be experiencing a different issue or actually running an older Node version (node -v).

You are running sudo npm. run: sudo node -v
What does it say?

You are running sudo npm. run: sudo node -v
What does it say?

thanks, reason is my Ubuntu server miss some dependencies https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix


⚠ Samsung has degraded performance

In 99df847, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2648 ms

Resolved: Samsung performance has improved in 83428fb.


split functor.go

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

14 of 14 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.2%) to 100.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.2%

Covered Lines:
1373

Relevant Lines:
1373

💛  - Coveralls


Add workaround for release publishing action mishandling draft: true -> false transition

This works around softprops/action-gh-release not being able to properly "publish" a release by changing draft: true to draft: false.
The intention is that the step with draft: false would find the existing draft release and update it (publishing it). This is what correctly happened for a testing v0.12.3-beta.3 release from this branch: https://github.com/pantsbuild/scie-pants/releases/tag/v0.12.3-beta.3 (I also did attempted a v0.12.3-beta.2 from this branch, but that used a newer version of the action code and failed completely, see below.)
Previously, the action would fail to find the existing draft release and instead create a duplicate one. The old behaviour is visible (to people who can see draft releases) with v0.12.3-beta.0 and -beta.1:

The particular new version of the action is:

changes: https://github.com/softprops/action-gh-release/compare/master...huonw:action-gh-release:huonw/pantsbuild-fix-see-scie-pants-439 (specifically commit https://github.com/huonw/action-gh-release/commit/998f80d5380609557d7464b01d59a10d845600a0 from branch https://github.com/huonw/action-gh-release/commits/huonw/pantsbuild-fix-see-scie-pants-439 )
this is v2.0.9 (the current v2 tag) with https://github.com/softprops/action-gh-release/pull/316 merged in
using v2.2.0 (the latest version of the action) fails while uploading artifacts with errors like Request body length does not match content-length header, so this sticks with the older version.

I've left a comment because it seemed like seeing real world usage was part of the review process, good call-out.


Check if gem name is allowed

Assuming you didn't receive my email, since the naming issue is still on the todo list and you're actively working on the project — here's my reply:

Hi Benjamin,
First of all sorry for the slow response. It’s holiday season and it took some time until your email was forwarded to the right people.
The authoritative source for this discussion is https://www.elastic.co/legal/trademarks.
Our main goal is to avoid any confusion what is supported by us and what is not.
Thus we would kindly ask you to change the name. But please let us know the new name, since we always try to keep track of what is going on in the ecosystem.
And we’d love to send you some swag for your efforts around Elasticsearch. Please send me your shipping address, so we can make it happen.
Out of interest: What’s the difference of your client / why did you not use the one built by my colleague Karel: https://github.com/elastic/elasticsearch-ruby
Couldn’t find that in the readme — might be interesting to add :)
Schöne Grüße aus Wien,
Philipp
PS: If you want to talk about your client at a meetup, let me know. We’re always looking for interesting talks.

hey, many thanks for your detailed response and feedback!
I actually received the mail, sry, i must have sorted it out erroneously.
ok, so i will rename it, no problem and i'll add the respective points to the readme, thx!
regarding meetup, ... would be nice, maybe after releasing it.
Beste Grüße aus Hamburg
Benjamin

I finally managed to rename the project

FYI today i officially released it: https://rubygems.org/gems/search_flip

Nice! Let me know if you want to do a talk about it at a meetup and I can introduce you to the right local organizers :)


JBPM-4638: UI restructuring. DatasetIntegration taskList. Updated jbp…

…m-console-ng-ht-showcase with the new filter module inclusion

Using this change the project compiles successfully now. I think we can merge this PR.

I merged this PR as we need the build to work again.


Add project file as a version source in plan resolver

Signed-off-by: Frankie Gallina-Jones<EMAIL_ADDRESS>
Summary

Look for things that look likefilename.csproj or filename.fsproj or filename.vbproj as a version source in plan resolver.
Use Cases

Checklist

[X] I have viewed, signed, and submitted the Contributor License Agreement.
[ ] I have added an integration test, if necessary.

@fg-j I think that we should add runtimeconfig.json into the priority mapping to match runtime

@fg-j I think that we should add runtimeconfig.json into the priority mapping to match runtime

@ForestEckhardt I was wondering about that... Any reason why it's not in there now? And is it problematic that we don't seem to have a test catching that case?

@ForestEckhardt I was wondering about that... Any reason why it's not in there now? And is it problematic that we don't seem to have a test catching that case?

@fg-j I think that its exclusion is just an oversight. I don't think that there is a great way to drive this out in something like dotnet-execute because we don't use aspnet in a standalone way in real world usage.

@fg-j I think that its exclusion is just an oversight. I don't think that there is a great way to drive this out in something like dotnet-execute because we don't use aspnet in a standalone way in real world usage.


[Bug] Unable to start all services as Docker Containers ChatQnA

Priority
P1-Stopper
OS type
Ubuntu
Hardware type
Xeon-SPR
Installation method

[ ] Pull docker images from hub.docker.com
[x] Build docker images from source

Deploy method

[X] Docker compose
[ ] Docker
[ ] Kubernetes
[ ] Helm

Running nodes
Single Node
What's the version?
https://github.com/opea-project/GenAIExamples/commit/3c164f3aa25bae957e436a09628235e1a11d6e8d
Description
When I run the command to run the E2E service with tgi backend and re-rank: docker compose -f compose.yaml up -d after having set my environment variables (I am not on proxy network) and building each docker image, I get a port error for the tgi-service, even though there is no process occuring on this port. The error can be seen in the attached image. This bars me from launching the system entirely.

Reproduce steps
Followed these instructions exactly to run megaservice with re-ranker using tgi-backend starting from here: https://github.com/opea-project/GenAIExamples/tree/main/ChatQnA/docker_compose/intel/cpu/xeon#-build-docker-images
Raw log
No response

Hi, I cannot reproduce the issue. Would you try with command
ps -ef | grep 9009

to double check if the port is occupied?

Closing the issue since no response for a while. Please re-open if the issue still hinders your development. thanks.


reverse dependency of core and spring

oap-core was extracted from oap-spring to reuse it in oap-micronaut. Now oap-spring & oap-micronaut depend on oap-core.
since core changes most often it causes new releases for oap-spring & oap-micronaut.
It would be nice to avoid that by converting the framework projects (which seldom change) to something like plugins of core.

.. or to make core configurable in the plugins so it is possible to update it indepedent of the framework projects.

.. or to make core configurable in the plugins so it is possible to update it indepedent of the framework projects.

gradle plugin processor dependency can be used multiple times, to "override" dependencies, see https://github.com/openapi-processor/openapi-processor-gradle/releases/tag/v2021.2


[analyzer] convert to async body with a non-void return type

void a(int Function() fun) {}
void b(void Function() fun) {}

void f() {
  a(() => 1);
  b(() {});
}

is offered an assist to be:
a(() async => 1);

which gives a compiler error.
I think it should not be offered when the return type is non-void. On the other hand, the assist for b() is fine.

It isn't clear to me that void is the issue here. It seems like it's bad to convert a closure to be async any time the expected return type is not Future or FutureOr. That is, we shouldn't offer the assist if it will result in the type of the closure becoming incompatible with the context type.

It's a tricky situation because the addition of an async modifier on a function literal body will in some cases pass the type checker without errors, and it will change the semantics of the function:
void f(dynamic Function() g) {
  print(g().runtimeType);
}

void main() {
  f(() => 1); // 'int'.
  f(() async => 1); // '_Future<int>'.
}

We can have a similar situation with a context type that seems much more statically safe:
import 'dart:async';

void f(FutureOr<int> Function() g) {
  print(g().runtimeType);
}

void main() {
  f(() => 1); // 'int'.
  f(() async => 1); // '_Future<int>'.
}

Is the analyzer assist action intended to be semantics preserving?

Assists aren't required to be semantics preserving, but they probably shouldn't be changing the semantics in ways that aren't reasonably obvious to users.
Perhaps we shouldn't offer the assist at all for closures (but there should be a fix if the context type requires a Future).

sdk/279519
The proposed CL, doesn't offer the assist for closures, except when the return type is void, Future or FutureOf.


Model with nullable FK fails parent child query with "Argument Types do not match"

If you have a model (see attached project) with class A with a nullable id field for child class E - int? EId, querying A->E fails with "argument types do not match" error.
            var item =
                (from a
                     in db.As
                 select new A
                 {
                     Id = a.Id,
                     EId = a.EId,
                     E = new E
                     {
                         Id = a.E.Id
                     }
                 }
                     ).First();

In attached project query_ef_test_ac fails with the following information:
Test Name:	BugDemoEF.EFTest.query_ef_test_ae
Test FullName:	BugDemoEF.EFTest.query_ef_test_ae
Test Source:	C:\Code\General\BugDemo\src\BugDemoEF\EFTests.cs : line 205
Test Outcome:	Failed
Test Duration:	0:00:01.976
Result StackTrace:
at System.Linq.Expressions.Expression.Bind(MemberInfo member, Expression expression)
at System.Linq.Expressions.ExpressionVisitor.Visit[T](ReadOnlyCollection1 nodes, Func2 elementVisitor)
at System.Linq.Expressions.ExpressionVisitor.VisitMemberInit(MemberInitExpression node)
at System.Linq.Expressions.ExpressionVisitor.VisitMemberAssignment(MemberAssignment node)
at System.Linq.Expressions.ExpressionVisitor.Visit[T](ReadOnlyCollection1 nodes, Func2 elementVisitor)
at System.Linq.Expressions.ExpressionVisitor.VisitMemberInit(MemberInitExpression node)
at Remotion.Linq.Clauses.SelectClause.TransformExpressions(Func2 transformation)    at Remotion.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel queryModel)    at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.NavigationRewritingExpressionVisitor.Rewrite(QueryModel queryModel)    at Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor.OptimizeQueryModel(QueryModel queryModel)    at Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor.CreateQueryExecutor[TResult](QueryModel queryModel)    at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass19_01.b__0()
at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
at BugDemoEF.EFTest.query_ef_test_ae() in C:\Code\General\BugDemo\src\BugDemoEF\EFTests.cs:line 208
Result Message:	Argument types do not match
BugDemo.zip

the problem is in here
                     E = new E
                     {
                         Id = a.E.Id
                     }

Because a.E is optional navigation, a.E.Id can potentially be null. To compensate we convert the calls to int? and now we are trying to fit int? into int column.
Workaround is to use anonymous type instead:
            var item =
                (from a
                     in db.As
                 select new
                 {
                     Id = a.Id,
                     EId = a.EId,
                     E = new
                     {
                         Id = (int?)a.E.Id
                     }
                 }
                     ).First();

Talking to @maumar and @ajcvickers, we don't feel like this is RTM, because of the workaround and it doesn't seem to be that common. Thoughts?
cc @rowanmiller @anpete

But E.Id is nullable, so why do we have to add the conversion?
What am I missing?

Try this solution:
var item =
    (from a
            in db.As
        select new A
        {
            Id = a.Id,
            EId = a.EId,
            E = new E
            {
                Id = (int)((int?)a.E.Id ?? 0)
            }
        }
            ).First();

Generates following query
SELECT [a].[Id], [a].[CId], [a].[DId], [a].[EId], [a.E].[Id], 0
FROM [As] AS [a]
LEFT JOIN [Es] AS [a.E] ON [a].[EId] = [a.E].[Id]
ORDER BY [a].[EId]

And does not throw above exception. ToList() version runs without any exception. (First() fails for me because my database doesn't have any data.)

Nope – the moment I add in the additional fields, it fails with the same error. The problem seems to be a lot deeper than just the key field and it applies to any model that has a parent with an optional child.
B.
From: Smit Patel<EMAIL_ADDRESS>Sent: Friday, May 27, 2016 2:22 PM
To: aspnet/EntityFramework<EMAIL_ADDRESS>Cc: brianro<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [aspnet/EntityFramework] Model with nullable FK fails parent child query with "Argument Types do not match" (#5522)
Try this solution:
var item =
(from a
in db.As
select new A
{
Id = a.Id,
EId = a.EId,
E = new E
{
Id = (int)((int?)a.E.Id ?? 0)
}
}
).First();
Generates following query
SELECT [a].[Id], [a].[CId], [a].[DId], [a].[EId], [a.E].[Id], 0
FROM [As] AS [a]
LEFT JOIN [Es] AS [a.E] ON [a].[EId] = [a.E].[Id]
ORDER BY [a].[EId]
And does not throw above exception. ToList() version runs without any exception. (First() fails for me because my database doesn't have any data.)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/aspnet/EntityFramework/issues/5522#issuecomment-222232407 , or mute the thread https://github.com/notifications/unsubscribe/ADYRDDmoIeIXaaDdKjxe6pI8r2NxDU6wks5qF0R0gaJpZM4Im7fi .  https://github.com/notifications/beacon/ADYRDC4lDkcVa-WRh5SzZeXN9WsUBtEMks5qF0R0gaJpZM4Im7fi.gif

As @maumar described above
A.E is option navigation. (due to Int32? a nullable type being FK property). Therefore A.E.Id can have null value and the result value is nullable type of whatever is type of A.E.Id. And that applies to all the properties of E.
Therefore based on what you want,
This should be the work-around.
var item =
    (from a
            in db.As
        select new A
        {
            Id = a.Id,
            EId = a.EId,
            E = a.EId.HasValue ?
            new E
            {
                Id = (int)a.E.Id
// if you add more property which are of non-nullable type, then explicit cast is needed
            }: null
        }
            ).ToList();

For further properties added inside new E you need to cast the properties if they are of non-nullable type since a.E.Property is still nullable type. That should work properly. (I tested above code in the project you provided and it works fine).
We can still do something about explicit cast not being required but work-around should be good enough for now.

@smitpatel - this solutions works thanks ... uglifies my code but its functional.

@brianro with https://github.com/aspnet/EntityFramework/commit/a24f9bc12c549d03499c2524fe2e3c57a4832c73 checked in, you should be able to just use coalesce, without any casting or HasValue checks. This is currently available in out nightly builds and will also be available in the next release

Super news - thank you so much for getting that knocked out.
As always, I appreciate your attentiveness and dedication.
B.

When doing this, also make sure the scenario from https://github.com/aspnet/EntityFramework/issues/5883 is taken care of - dotting thru an optional nav to get a value

fixed in 7d359abdca1046a41c1cdffed1a88d80af99fed1

I'm running into a similar problem and I've tried all the workarounds and fixes but none of them worked. Here is my code and bear in mind I'm getting the same error.
https://gist.github.com/DmsChrisPena/a8bfa560f5c2bd2565a778a67018dcd1

@DmsChrisPena the issue being tracked here is fixed. If you are still seeing the failure on our nightly builds, then please open a new issue with details.


Add Normal Mode

Implementing #70.
I must say, I have never done a PR before and haven't much coding experience (yet).
I just want to know if what I started with makes any sense at all and if I am on the right track

I know I said I'd try to keep discussion on the other thread, but I saw this and had to reply directly:

I must say, I have never done a PR before and haven't much coding experience (yet).

Congrats on your first PR! I hope it won't be your last, feel free to stick around!

Testing your work combined with my PR, confirmed this works for me! Thanks for your contribution. If you don't have any questions or issues with my PR, feel free to merge it into your fork. Once that's done, we'll be able to merge your fork into the main repo.
Sorry for the complex process there :sweat_smile:. Let me know if you have any questions!