Infinite solve if variants can not be solved

Tested with rez 2.13.0. Attached minimal setup with README.
This seems to be the minimal setup:
Package 1 "python_provider":
variants = [
['maya', '!houdini', '!nuke']
]
Package 2 "pyqt":
varriants = [
['houdini-15'],
['nuke-8'],
]
Package 3 "maya":
Regular.
Solve:
rez-env python_provider pyqt maya -vv
Give us a python_provider (maya, but not houdini and not nuke), maya and pyqt
(which does not have a variant that would not break the python_provider variant requirement).
Instead of failing the solver solves forever.
rez_solver_bug.zip

Fantastic, thanks Blazej
A
On Fri, May 12, 2017 at 5:32 AM, Blazej Floch<EMAIL_ADDRESS>wrote:

Tested with rez 2.13.0. Attached minimal setup with README.
This seems to be the minimal setup:
Package 1 "python_provider":
variants = [
['maya', '!houdini', '!nuke']
]
Package 2 "pyqt":
varriants = [
['houdini-15'],
['nuke-8'],
]
Package 3 "maya":
Regular.
Solve:
rez-env python_provider pyqt maya -vv
Give us a python_provider (maya, but not houdini and not nuke), maya and
pyqt
(which does not have a variant that would not break the python_provider
variant requirement).
Instead of failing the solver solves forever.
rez_solver_bug.zip
https://github.com/nerdvegas/rez/files/994202/rez_solver_bug.zip
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/nerdvegas/rez/issues/422, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABjqSuiwvRZSh2wojUJjxse9BtYH4sAUks5r42JegaJpZM4NYc_F
.

Briefly looking into it.
The problem seems to be in the split. At least both failed conditions are being catched (!nuke & !houdini).
First it does split (reason: first variant) [pyqt==4.11.4.tbe1[0,1]] into [pyqt==4.11.4.tbe1[0]]* and pyqt[==4.11.4.tbe1(2:3)]
It fails solving [pyqt==4.11.4.tbe1[0]]
Then it pops pyqt[==4.11.4.tbe1(2:3)] and splits it again into
[pyqt==4.11.4.tbe1[1]]* and [pyqt==4.11.4.tbe1[0,1]]
Then it splits [pyqt==4.11.4.tbe1[0,1]] into [pyqt==4.11.4.tbe1[0]]* and pyqt[==4.11.4.tbe1(2:3)]
And so on ... I do not really know about the syntax. What does package[==version(2:3)] mean compared to [package==vesion[0,1]]? Why wouldn't it split [0,1] into [0] and [1]?

This might be the solve. I am not making this a pull request before you have your eyes on it.
Basically in the case of two entries we only need to split into [0] and [1]. We do not need to add the rest of the variants.
rez/solver.py at line 833
            if result:
                entry, next_entry = result
                entries = self.entries[:i_entry] + [entry]
                if len(self.entries) > 2:
                    next_entries = [next_entry] + self.entries[i_entry:]
                else:
                    next_entries = [next_entry]
            else:
                entries = self.entries[:i_entry + 1]
                next_entries = self.entries[i_entry + 1:]

I looked around further. I wonder if my fix is not a bug itself in case the n_variants is not 1 for len(2) entries. Probably this is not generic enough. Will rethink it on Monday, I should write a few unit tests to make sure I am not introducing any side effects.
Feel free to propose a better fix, I still have to get to know the surrounding code.

The pull request should be the proper fix to my best knowledge.
Allan, please take a good look if I figured the intention of the code correctly. If you can think of cases where this might break (expected or existing) behavior let me know.

There is another pull request for the same bug:
#448

I believe this has been fixed.


Update README

What's the motivation for this change?

What's the motivation for this change?

Just trying to improve the readme.


[C++][FS][Azure] Edgecase where GetFileInfo incorrectly returns NotFound on flat namespace and Azurite

Describe the bug, including details regarding any error messages, version, and platform.
The problem
Imagine in the following directory structure:
container-name/a/    directory
container-name/a.txt    file

fs->GetFileInfo("container-name/a/") returns FileType::NotFound.
Why it happens

fs->GetFileInfo("container-name/a/") returns causes a list with prefix a and limit 1.
The result is a.txt because . comes before / lexographically.
This doesn't match the requested name so return FileType::NotFound.

Component(s)
C++

I'm going to try fixing this. I think it will require an extra list operation but only in this edgecase.

Issue resolved by pull request 44302
https://github.com/apache/arrow/pull/44302


Update 01slides.Rmd

add Git Large File Storage (LFS) for file larger than 100MB

Thanks for this; I'll incorporate it soon!


here is my binaary classification app

🛠 Related Issue

Closes #[issue_number]

📝 Description

[Provide a concise description of the changes. Include the purpose and any relevant context or details.]
🔍 Type of PR

[ ] 🐛 Bug fix
[ ] ✨ Feature enhancement
[ ] 📚 Documentation update
[ ] 🛑 Other (specify): _______________

📸 Screenshots / 🎥 Videos (if applicable)

[Attach screenshots or videos]
✅ Checklist

[ ] I have performed a self-review of my code.
[ ] I have read and followed the Contribution Guidelines.
[ ] I have tested the changes thoroughly before submitting this pull request.
[ ] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[ ] I have commented my code, particularly in hard-to-understand areas.

ℹ Additional Context

[Include any additional context or information that might assist reviewers in understanding the changes]

sorry sir because I was making App so lack of time I have muted same read me in all please consider it

from next time I will keep in my mind but please this time consider it

the app are working fine and properly
https://501da458aa534f88bd.gradio.live you can check  please

updated


fix: delete database when engines starting or stopping

when deleting a database the check if the attached engines are starting or stopping was wrong

Would you be able to add some tests for this?


Break out generic transformer logic

build_log_combiner.dart and other logic related to build logs should move into code_transformers, including the log widget and transformers that inject it.
index_page_builder.dart should move into another package, maybe code_transformers as well.
polyfill_injector.dart should move into web_components.
html_finalizer.dart should move into another package, or be the beginning of a new package.

Lots of this is done now index_page is a separate package, and lots of other logic moved to web_components


Default undercloud control plane network violates rfc5737

The default control plan is <IP_ADDRESS>/24 which is not supposedto be used, it is only for documentation purposes according to rfc5737:
https://tools.ietf.org/html/rfc5737
"Addresses within the TEST-NET-1, TEST-NET-2, and TEST-NET-3 blocks
SHOULD NOT appear on the public Internet and are used without any
coordination with IANA or an Internet registry [RFC2050]. Network
operators SHOULD add these address blocks to the list of non-
routeable address spaces, and if packet filters are deployed, then
this address block SHOULD be added to packet filters.
These blocks are not for local use, and the filters may be used in
both local and public contexts."
It breaks tools that enforce the filters.

This default is inherited from instack-undercloud. We should fix it there.
We can open bugs on instack-undercloud here: https://bugs.launchpad.net/tripleo


404 error - package not found

Following the Readme example, I set up a project with the datepicker in it, but I'm getting this error when I try to run the page:
angular2-polyfills.js:390 Error: XHR error (404 Not Found) loading http://localhost:4200/ng2-datepicker(...)
The page just has "hello world" and the datepicker copied directly from the Readme example. Without the datepicker, it works fine, but if I include it in the HTML or if I take it out of the directives array, then I get the 404. Any idea what could be going on?
Everything is set up exactly like the Readme example

Hi, please check the new readme.


Update agreement-generation scripts to use details from API

Previously we needed to pass in a JSON file but now this JSON will come from the frameworkAgreementDetails an the API response for the framework.

Note I used different names for the key pageNumber (->signaturePageNumber)  and made it and pageTotal integers, not strings.

oh and also I got rid of the frameworkName because I thought we agreed that the whole framework dictionary should be the context passed to the template, hence it would have access to the name...?


scalecodec reports ValueError: Index '109' not present in Enum type mapping

I spotted the following error in payctl. It's related to scalecodec:
Signing account info: {'nonce': 417, 'consumers': 0, 'providers': 1, 'sufficients': 0, 'data': {'free': xxxxxx, 'reserved': 0, 'misc_frozen': 0, 'fee_frozen': 0}}
Expected tx fee 0.020000000  xx
Submitting batch extrinsic to claim 3 rewards (in 1 eras)
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 1232, in process
    enum_type_mapping = self.type_mapping[self.index]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.local/bin/payctl", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.9/site-packages/payctl/payctl.py", line 236, in main
    cmd_pay(args, config)
  File "/home/user/.local/lib/python3.9/site-packages/payctl/payctl.py", line 185, in cmd_pay
    fees = extrinsic_receipt.total_fee_amount
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 3376, in total_fee_amount
    self.process_events()
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 3161, in process_events
    if self.triggered_events:
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 3149, in triggered_events
    if self.extrinsic_idx is None:
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 3118, in extrinsic_idx
    self.retrieve_extrinsic()
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 3092, in retrieve_extrinsic
    block = self.substrate.get_block(block_hash=self.block_hash)
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 2465, in get_block
    return self.__get_block_handler(
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 2424, in __get_block_handler
    return decode_block(response['result']['block'], block_data_hash=block_hash)
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 2317, in decode_block
    extrinsic_decoder.decode()
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 874, in decode
    self.value_serialized = self.process()
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 2886, in process
    self.value_object.update(self.process_type(extrinsic_version, metadata=self.metadata).value_object)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 979, in process_type
    obj.decode(check_remaining=False)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 874, in decode
    self.value_serialized = self.process()
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 572, in process
    field_obj = self.process_type(data_type, metadata=self.metadata)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 979, in process_type
    obj.decode(check_remaining=False)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 874, in decode
    self.value_serialized = self.process()
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 1536, in process
    call_obj = self.process_type(call_type_string, metadata=self.metadata)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 979, in process_type
    obj.decode(check_remaining=False)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 874, in decode
    self.value_serialized = self.process()
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 1536, in process
    call_obj = self.process_type(call_type_string, metadata=self.metadata)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 979, in process_type
    obj.decode(check_remaining=False)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 874, in decode
    self.value_serialized = self.process()
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 1245, in process
    raise ValueError("Index '{}' not present in Enum type mapping".format(self.index))
ValueError: Index '109' not present in Enum type mapping

Payout was successful, but I upgraded scalecodec to see if that prevents errors in the future.

scalecodec-1.2.9 (from scalecodec-1.2.7)
substrate-interface-1.7.4 (before substrate-interface-1.7.4, also upgraded just in case)

Even if this does help, I won't know for a while: I checked logs from last 2 weeks and none had any errors or warnings.
I guess it's not a problem in this script so i created this issue in the xxchain repo.

Similar or same issue with newer versions of substrate-interface and scalecodec:

scalecodec-1.2.9
substrate-interface-1.7.8

Traceback (most recent call last):
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 1232, in process
    enum_type_mapping = self.type_mapping[self.index]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.local/bin/payctl", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.9/site-packages/payctl/payctl.py", line 236, in main
    cmd_pay(args, config)
  File "/home/user/.local/lib/python3.9/site-packages/payctl/payctl.py", line 185, in cmd_pay
    fees = extrinsic_receipt.total_fee_amount
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 3390, in total_fee_amount
    self.process_events()
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 3175, in process_events
    if self.triggered_events:
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 3163, in triggered_events
    if self.extrinsic_idx is None:
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 3132, in extrinsic_idx
    self.retrieve_extrinsic()
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 3106, in retrieve_extrinsic
    block = self.substrate.get_block(block_hash=self.block_hash)
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 2479, in get_block
    return self.__get_block_handler(
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 2438, in __get_block_handler
    return decode_block(response['result']['block'], block_data_hash=block_hash)
  File "/home/user/.local/lib/python3.9/site-packages/substrateinterface/base.py", line 2330, in decode_block
    extrinsic_decoder.decode(check_remaining=self.config.get('strict_scale_decode'))
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 878, in decode
    self.value_serialized = self.process()
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 2887, in process
    self.value_object.update(self.process_type(extrinsic_version, metadata=self.metadata).value_object)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 983, in process_type
    obj.decode(check_remaining=False)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 878, in decode
    self.value_serialized = self.process()
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 572, in process
    field_obj = self.process_type(data_type, metadata=self.metadata)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 983, in process_type
    obj.decode(check_remaining=False)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 878, in decode
    self.value_serialized = self.process()
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 1536, in process
    call_obj = self.process_type(call_type_string, metadata=self.metadata)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 983, in process_type
    obj.decode(check_remaining=False)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 878, in decode
    self.value_serialized = self.process()
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 1536, in process
    call_obj = self.process_type(call_type_string, metadata=self.metadata)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 983, in process_type
    obj.decode(check_remaining=False)
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/base.py", line 878, in decode
    self.value_serialized = self.process()
  File "/home/user/.local/lib/python3.9/site-packages/scalecodec/types.py", line 1245, in process
    raise ValueError("Index '{}' not present in Enum type mapping".format(self.index))
ValueError: Index '21' not present in Enum type mapping

After this I upgraded related packages to:

scalecodec-1.2.11
substrate-interface-1.7.10

Spent some hours trying to figure this out - I wonder if the problem is related to use_remote_preset=True in
https://github.com/armchairancap/xx-substrate-payctl/blob/81f5902ab3dca4b04debc871cdbcbc6e2171d23c/payctl/payctl.py#L12
As there's no remote preset, maybe that should be False. I changed to False on my own instance and will run it like that for a few weeks.


support rolling log by time

Issues associated with this PR
#457
Sign the CLA
Make sure you have signed the CLA
Solutions

roller可配置
新增通过日期做日志轮滚
增加测试用例
readme文档

UT result
Unit Test is needed if the code is changed, your unit test should cover boundary cases, corner cases, and some exceptional cases.
And you need to show the ut result.
Benchmark
If your code involves the processing of every request, you should give the Benchmark Result
Code Style

LGTM


feat(linter): add typescript/no-require-imports rule

add test case for covering require in function https://github.com/oxc-project/oxc/pull/7316#discussion_r1845228949 original rule has same behavior


[W3C API] Implement the device-radius media feature in CSS Media Queries

BUG=XWALK-4734
I would like to contribute the 'device-radius' media feature as one of the CSS Media Queries' new features, so I asked for two pull requests in chromium-crosswalk and blink-crosswalk. After all codes are merged and built well, it can be tested the command below.
xwalk http://anawhj.github.io/crosswalk-test-suite/webapi/webapi-rounddisplay-w3c-tests/ --round-display
Modified files in blink-crosswalk

Source/core/css/MediaFeatureNames.in
Source/core/css/MediaQueryEvaluator.cpp
Source/core/css/MediaQueryExp.cpp
Source/core/css/MediaValues.h
Source/core/css/MediaValues.cpp
Source/core/css/MediaValuesCached.h
Source/core/css/MediaValuesCached.cpp
Source/core/css/MediaValuesDynamic.h
Source/core/css/MediaValuesDynamic.cpp

@darktears PTAL

Let me retry this PR.


Very slow loading problem

Could you please check this file?
Using epub.js it loads fast but bibi loads it 43 seconds (browser tab freezes in Chrome).
Bibi makes 4032 requests and loads 46.7 MiB of blobs.
Epub file is only 4.8 MiB and unpacked 6.2 MiB.

Thanks for trying and reporting.
Your EPUB consists of 1309 XHTMLs and all of them are reflowable content.
I'm so sorry but Bibi on now is not good at opening this kind of book which contains hundreds of items to be shown reflowable. (It's the problem around the number of the items, not the total size.)
In the future, I want Bibi able to load content asynchronously not only for pre-paginated/fixed-layout books but also for reflowable books. But for now, Bibi can't.

Too bad. Nice viewer, though.
Client has different epubs and we are trying to show then in a web viewer.
Can we load this kind of epub faster with Bibi?

one page only
forced fixed layout
Or something like that?

@hrvoj3e  Thanks & sorry.

Can we load this kind of epub faster with Bibi?
(...)

Take a look at these samples please.

Fast (reflowable, 3 items) - https://bibi.epub.link/my/name/is/bibi/?book=idpf/samples/WCAG
Slow but can (reflowable, 142 items) - https://bibi.epub.link/my/name/is/bibi/?book=idpf/samples/moby-dick
Very Fast (fixed, 9 items) - https://bibi.epub.link/my/name/is/bibi/?book=idpf/samples/page-blanche-bitmaps-in-spine

If it's a fixed-layout book, Bibi will open quickly, even if it contains 300 or 400 or more items.


Cors support broken for Kubernetes

In what area(s)?

/area runtime
/area operator

What version of Dapr?

1.0.0-rc.1

Expected Behavior
We're porting eShopOnContainers to Dapr. The front-end is implemented as a SPA application that runs on port 5014. The front-end sends requests to an Api Gateway (implemented using Envoy) that routes the incoming requests to the back-end microservices. The Api Gateway runs on port 5202. We've added a Dapr sidecar to the Api Gateway and changed the Envoy routing rules to use it so we can use Dapr service invocation to call the back-end services:
SPA [5014] -http-> Envoy [5202] -http-> Sidecar [3500] -grpc-> Back-end service
Prior to RC1, Dapr provided Cors functionality by default, and this scenario worked flawlessly.
Actual Behavior
With RC1, the Cors middleware has been made optional (see #2285). This is a breaking change for our scenario. It causes the Dapr sidecar to reject the incoming request from the Envoy proxy because localhost:5014 isn't an allowed origin anymore.
If we run the solution in self-hosted mode using Docker Compose, we can fix it by adding the -allowed-origins "http://localhost:5104" flag to the Docker command.
However, in Kubernetes we don't have an option to specify allowed origins. To fix it, there'd need to be support for a dapr.io/allowed-origins annotation.
Steps to Reproduce the Problem
The code for the described scenario is available in the https://github.com/dotnet-architecture/eShopOnDapr repo.
If you comment out line 275 ("-allowed-origins", "http://localhost:5104,http://localhost:5107",) in the docker-compose.override.yml, then all calls from the front-end to the back-end services will fail and you won't be able to browse the catalog.
Release Note

Thanks for raising this. When Cors isn't enabled, Dapr does not reject any call, so it seems weird that this is what's causing the issue.

The problem lies with the preflight request. When I don't specify "-allowed-origins", "http://localhost:5104,http://localhost:5107", the Dapr sidecar gives the following response to the preflight request:
HTTP/1.1 200 OK
content-length: 0
allow: DELETE, GET, OPTIONS, POST, PUT

This is not enough to pass the access control check in the browser, because it doesn't contain an Access-Control-Allow-Origin header. Therefore, the browser blocks the actual request.
Once we add the "-allowed-origins", "http://localhost:5104,http://localhost:5107" flag, the preflight response changes to:
HTTP/1.1 200 OK
content-length: 0
access-control-allow-origin: http://localhost:5104
access-control-allow-methods: GET
access-control-allow-headers: authorization

By the way, adding "-allowed-origins", "*" also doesn't work. It behaves the same as not specifying the -allowed-origins flag at all. I expected it to add a access-control-allow-origin: * header to the preflight response.

@yaron2 I fixed our solution by moving the Cors handling to the Api Gateway (Envoy proxy), as that's a much better place to handle it anyway. Envoy then routes the requests to a Dapr sidecar which now doesn't need the -allowed-origins flag anymore.
I still think it's better to have parity between the flags you can specify manually and the K8s annotations. However, now that I've moved Cors handling to the Api Gateway, I'm struggling to think of a scenario where I would want/need Cors handling in a Dapr instance.

@amolenk - Can this issue be closed now, since I do not think there is a issue here with the Dapr runtime needing to handle Cors.

@amolenk - Can this issue be closed now, since I do not think there is a issue here with the Dapr runtime needing to handle Cors.


[Question] Is it normal to send one request for each subscriber?

I'm noticing in my code that if I do something similar to the following:
[[client getRequestSignal] flattenMap: flattenMap:^RACStream *(id jsonDict) {
    return [RACSignal return:[jsonDeserializer deserializeJsonDict:jsonDict]];
}];

What actually happens it that multiple RACSubscribers get attached to the signal, which also sends out multiple HTTP requests.  This seems like a rather inefficient way to implement this feature.  Am I doing something incorrectly here?

Don't flatMap across the signal, just map across it.

I ran into this also, so what I did was whenever there was a network signal that I only wanted sent once but I had multiple subscribers that need the value, I just call replay on the request signal.

@CodaFi Was this behavior a design choice? In some cases its handy to have a signal that I can keep subscribing to make new requests, but initially I thought new subscribers would just replay the previous response.

The reason I flat map across is is because the process of deserialization can cause an error.  The real code looks more like this:
[[client getRequestSignal] flattenMap: flattenMap:^RACStream *(id jsonDict) {
    NSError * error = nil;
    id obj = [jsonDeserializer deserializeJsonDict:jsonDict error:&error];
    return error ? [RACSignal error:error] : [RACSIgnal return:obj];
}];

For whatever it's worth.  RACSignal map: is implemented using flattenMap:
	Class class = self.class;

	return [[self flattenMap:^(id value) {
		return [class return:block(value)];
	}] setNameWithFormat:@"[%@] -map:", self.name];

@k Good question.  What happens when you want to re-trigger the request with different parameters?


Signup Form for password input not displaying ••• on MacOS Safari (CSS issue)

Hey!
The signup field on MacOS (Desktop) Safari 10.0.3 has an issue. It works in Chrome for me. It doesn't display any input characters (•) on typing. Signup works anyway.
Deleting the padding: 30px 20px; for input.form-control in the developer tools fixes the issue, but then the inputs are too small, obviously.
Cheers =)

This has been replicated. Will deploy hotfix for this shortly.

Fixed and deployed.


Why ingress ADDRESS not shown

Welcome!

[x] Yes, I've searched similar issues on GitHub and didn't find any.
[X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What version of the Traefik's Helm Chart are you using?
10.24.0
What version of Traefik are you using?
2.8.0
What did you do?
Chart
ingressClass:
  enabled: true
  isDefaultClass: true

providers:
  kubernetesCRD:
    enabled: true
    allowCrossNamespace: true
    allowExternalNameServices: true
    allowEmptyServices: true
  kubernetesIngress:
    enabled: true
    allowExternalNameServices: true
    allowEmptyServices: true
    publishedService:
      enabled: false

ports:
  traefik:
    port: 9000
    expose: true
    exposedPort: 9000
    nodePort: 9000
    protocol: TCP
  web:
    port: 80
    expose: true
    exposedPort: 80
    nodePort: 80
    protocol: TCP
  websecure:
    port: 443
    expose: true
    exposedPort: 443
    nodePort: 443
    protocol: TCP

service:
  type: NodePort

securityContext:
  capabilities:
    drop: []
    add:
      - ALL
  readOnlyRootFilesystem: false
  runAsGroup: 0
  runAsNonRoot: false
  runAsUser: 0

podSecurityContext:
  fsGroup: 0

Install
helm upgrade traefik traefik/traefik \
  --install \
  --create-namespace \
  --namespace traefik \
  --values values.yaml \
  --version 10.24.0

Optionally

kubectl -n default edit ingress my-app change ingressClassName to nginx

change ingressClassName back to traefik

Ingress
kubectl get ingress -A

What did you see instead?

Inress ADDRESS not shown.

But they works.

Try to change ingressClassName to nginx and then change back. ADDRESS is shown.

external-dns can not find ingress endpoints.

What is your environment & configuration?

Additional Information
Thanks!

Hello @icefery,
Thanks for your interest in Traefik.
This repository is about the Helm Chart of Traefik.
The behavior you describe seems to be an issue with Traefik itself and not the Helm chart.
So I invite you to test again on last traefik version and submit an issue on traefik repo if it's still there.

I think this issue fits well this repo as by default providers.kubernetesIngress.publishedService is disabled. That's at least confusing if not a bug in the helmchart.

\o @jonathanbeber This is correct. Thanks. I re-open this issue. Feel free to open a PR on this if you need it.


EULA Link for Microsoft Edge WebDriver Returns 404 Error

Link to the documentation page: https://msedgedriver.azureedge.net/EULA
Description of the issue: On August 13, 2024, around 3:00 PM JST, I attempted to access the EULA link on the official Microsoft Edge WebDriver page, but encountered a 404 error. Multiple attempts yielded the same result.
Screenshots:
Microsoft Edge version: Occurs regardless of the version.

Thank you for filing this issue. I will raise it with the team and we'll start looking into it.

The 404 issue has now been resolved. Closing this issue. Thank you for your patience.


feat(): Fix workflow with updated node version.

:tada: This PR is included in version 0.5.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[TC-S-3.1] Manual Yaml script has to be updated as per Verification step document

Description:
TC-S-3.1

[ ] Step 1
Command has to be updated as per Verification Step document.
It has to updated from   ./chip-tool scenesmanagement add-scene 0x0001 0x01 20 "scene name" '[{"clusterID": "0x0300", "attributeValueList":[{"attributeID": "0x4001", "attributeValue": "0x01"}]}]' 1 1 to ./chip-tool scenesmanagement add-scene 0x0001 0x01 20 "scene name" '[{"clusterID": "0x0300", "attributeValueList":[{"attributeID": "0x4000", "valueUnsigned16": "0x01"}]}]' 1 1

Steps to reproduce:
Step 1
Verification step document References:

https://docs.google.com/spreadsheets/d/13zltSz50GRs_kidvobceEuIT8kAAHSK64ANyWcc3xQI/edit?gid=1845308885#gid=1845308885&range=199:199

Yaml Rferences:

https://github.com/project-chip/connectedhomeip/blob/master/src/app/tests/suites/certification/Test_TC_S_3_1.yaml

Addressed in PR:
https://github.com/project-chip/connectedhomeip/pull/35050

Issue fixed in PR https://github.com/project-chip/connectedhomeip/pull/35050. Hence closing it.


Started to put new code into SPIDER framework

Hi @leandermue,
two basic changes please before merging:

Undo the changes to README.md
Rename your hex_final.geojson to hydro.geojson (and change the name on line 3 in hydro.yml)

More importantly:
The loops in your hydro.py seem to make it too slow to really be useable... Is it the same for you? If I move a slider, it hangs for a couple of seconds before doing anything. For it to work with the instant web thing, we either need to (a) reduce the number of hexagons drastically (could be fine?) or (b) remove any looping behavior (if you look at fish.py it's basically just arithmetic).


UI: All regression in Workflow Archive view

Summary
All archived workflows should be shown when All is selected in the dropdown on the workflow archive page. Instead, it seems like only 10 are shown (which is the default).

Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

What version is this on? Can't seem to be able to reproduce

I was trying this on what's in master, but it's entirely possible I was using an unsupported combination of services as well (I was running the UI in master while port-forwarding to an older version of Argo that's running in our cluster).

Gtocha. Yeah I was not able to reproduce... if you see this bug again feel free to ping this and I'll reopen

One thing that is annoying is that we don't save the pagination preference... will fix that


Rename META-INF.services -> META-INF/services for dropwizard-request-logging

Rename META-INF.services -> META-INF/services for dropwizard-request-logging.  Closes https://github.com/dropwizard/dropwizard/issues/1742

Coverage remained the same at 82.274% when pulling 7a46346f3006fb447efeb989ae2a8122d3cf87f1 on jmoney8080:master into 7555c73c066ee8a1425d19a84d20708bbbc5f2bc on dropwizard:master.

Coverage remained the same at 82.274% when pulling 47a1955e439711c2e2be20ee5f38909bda1691f1 on jmoney8080:master into 7555c73c066ee8a1425d19a84d20708bbbc5f2bc on dropwizard:master.

LGTM. Good find! Thanks for taking care of this and thanks, @nickbabcock for the test case.


Provider mailer: conditional text if eligible for IRP

Context
If an application fulfils certain criteria, it may be eligible for international relocation payment (IRP), in which case we should notify the provider.
Changes proposed in this pull request
When a candidate submits an application that fulfils certain criteria (non-British, lives outside UK/Ireland, right to work in UK, and wishing to teach classics, modern languages or physics), the provider mailer emails include some text about the candidate's eligibility for the IRP.
Link to Trello card
https://trello.com/c/AtS9k2PO/1170-provider-email-conditionally-render-copy-if-we-think-someone-is-eligible-for-irp
Things to check

[ ] If the code removes any existing feature flags, a data migration has also been added to delete the entry from the database
[ ] This code does not rely on migrations in the same Pull Request
[ ] If this code includes a migration adding or changing columns, it also backfills existing records for consistency
[ ] If this code adds a column to the DB, decide whether it needs to be in analytics yml file or analytics blocklist
[ ] API release notes have been updated if necessary
[ ] Required environment variables have been updated added to the Azure KeyVault

Just tested this on the review app, it's looking good and sends in the right instances and doesn't when it shouldn't. Once we get the link we can 🚢

@MaeveRoseveare where da link at

@carlosmartinez don't worry Snoop Dogg, we've chased this morning.

Added link in.
Question:

Do we want to make the link bullet pointed or inset text at all? cc @MaeveRoseveare

Next steps:

The page is not live yet, so I'm going to put a DNM tag on this until the 27th.


loose coupling transcription and translation steps

The steps of transcription and translation currently appear to be relatively tightly coupled. We can see that the subtitles generated by the transcription are processed in the translation step.
# file: openlrc/openlrc.py
def process_translation(base_name, target_lang, transcribed_opt_sub, skip_trans):
    ...
    if skip_trans:
        shutil.copy(transcribed_opt_sub.filename, final_json_path)
        transcribed_opt_sub.filename = final_json_path
        return transcribed_opt_sub
   ...

And finally generated in translation worker.
def translation_worker(self, transcription_queue, target_lang, skip_trans, bilingual_sub):
       ...
        # Handle translation
        final_subtitle = process_translation(base_name, target_lang, transcribed_opt_sub, skip_trans)

        # Generate and move subtitle files
        generate_subtitle_files(final_subtitle, base_name, subtitle_format)
       ...

This seems to violate the SRP.
At the same time, even specified skip trans=True , the translation thread will still be started. Users pay for the additional performance overhead even though they are not using it.
I wish we could decouple the two steps of transcription and translation:
- The translation step no longer processes transcribed files.
- The translation thread is no longer started when skip_trans=False is specified.
I am not familiar with nlp related knowledge. But if you agree, maybe I can try to complete this improvement.

Thank you for this detailed analysis.
I do think the structure of openlrc.py is not good - the tight coupling between transcription and translation makes the code less maintainable and less efficient. I actually started addressing some architectural issues in commit c7db967ba3d5d62c9d8e214073879fe465acd70d, but there's still room for improvement.
Feel free to open a PR with your proposed changes!


Remove overriding development finders

We don't want the finders that we have been using for developing new features to override those that we've defined in content store.
It'll be really confusing to troubleshoot, and people may make unwitting changes to the development finders, not being aware that they might actually be in use on the production system.

This is being done elsewhere


action.yml in project root possible?

Would it be possible to shorten the uses: to uses: jenkins-infra/jenkins-security-scan@v1, eg. by moving the action.yml to the project root?
Thanks to copy & paste it's not a big deal, but Actions are more usable without the need to remember full paths – <user>/<repo>@<version> is easy to use.

Yeah, this is annoying, but GitHub explicitly documents it as such:

Reusable workflows are YAML-formatted files, very similar to any other workflow file. As with other workflow files, you locate reusable workflows in the .github/workflows directory of a repository. Subdirectories of the workflows directory are not supported.

I see, seems I mixed Actions and reusable workflows.


Part 2 of fix for https://github.com/brave/brave-browser/issues/1782

Shouldn't be merged until https://github.com/brave/Squirrel.Windows/pull/6 is merged
Replace StubExecutable.exe and Update.exe with binaries created with https://github.com/brave/Squirrel.Windows/pull/6
Pre-approval checklist

[x] Ensure https://github.com/brave/Squirrel.Windows/pull/6 is merged
[x] Get rid of test commits (changing package.json name, version bumps)

Post merge checklist

[ ] Publish this package on npm
[ ] Update the muon-winstaller reference in browser-laptop (muon-upgrade-windows branch) and then fix the usage in buildInstaller.js

Ready for review 😄


Better reporting of download/unpack issues

Currently issues during download or unpacking result in only very quickly disappearing pop-ups.
This makes them easy to miss and harder to debug and fix download issues reported by users.

Slightly improved with 9a73226c5d6769ca7ac50e72a5585f65a6bdc086.
Errors now need to be explicitly acknowledged.

Further improvements in 4ca6ad93d52dce0812a814e283264e4b3e0c73fd, hoping it actually works now and thus closing.


remove String property from "Add Item"

remove this code snippet seems to fix the problem

One small issue found:
When we click "Add Item", only left side respond, shall we make the whole row respond ?

One small issue found:
When we click "Add Item", only left side respond, shall we make the whole row respond ?

fixed


Option to format on leave/enter buffer

Hello,
I've searched for but I didn't found it..
Is there any option or way to run the formatter(s) if I leave or enter a buffer?
My nvim saves if I switch from insert mode to normal mode. Often the behavior is not so good, because lines are shifted on formatting but the cursor stays in the original line.
I've tried already some auto-commands, but none of them has worked.
Thanks by the way for this awesome plugin.

An autocmd is the way to go here. Like the example in the README
vim.api.nvim_create_autocmd("BufWritePre", {
  pattern = "*",
  callback = function(args)
    require("conform").format({ bufnr = args.buf })
  end,
})

Except instead of BufWritePre you'll use BufLeave or BufEnter. If it's not working, use the provided debugging tools to check the logs and see if you can find out what's going on. If that doesn't resolve it, feel free to post a minimal init.lua file that reproduces the issue (like the one provided in the bug report template) and I'll take a look.

Thank you @stevearc for your very fast reply :)
Yes, I've seen that before in the README.md but in this case I maybe don't understand it..
Is this autocmd not for automatically formatting the current buffer every time the buffer is saved?
It is the same behavior like the config shortcut you've provided in the README.md, not?
Here the shortcut example:
require("conform").setup({
  format_on_save = {
    -- These options will be passed to conform.format()
    timeout_ms = 500,
    lsp_format = "fallback",
  },
})

If yes, and I understand it correctly, I'd like to avoid that because my nvim saves always if I switch from insert mode into normal mode. This leads in my case to unwanted behavior in the editing process, what was the origin of my thoughts and my question. I'd only like to format if I leave or jump into a buffer.
If no, and I understand it wrong, here is my actual conform.lua configuration file:
-------------------------------------------------------------------------------
-- Conform Plugin
-- https://github.com/stevearc/conform.nvim
-- Lightweight yet powerful formatter plugin for Neovim.
-------------------------------------------------------------------------------

return {
  'stevearc/conform.nvim',
  opts = {},
  event = { "BufReadPre", "BufNewFile" },
  config = function()
    local conform = require("conform")

    conform.setup({
      formatters_by_ft     = {
        blade           = { "blade-formatter" },
        css             = { "prettierd" },
        graphql         = { "prettierd" },
        html            = { "prettierd" },
        json            = { "prettierd" },
        javascript      = { "prettierd" },
        javascriptreact = { "prettierd" },
        liquid          = { "prettierd" },
        lua             = { "stylua" },
        markdown        = { "prettierd" },
        python          = { "isort", "black" },
        shell           = { "shfmt" },
        svelte          = { "prettierd" },
        typescript      = { "prettierd" },
        typescriptreact = { "prettierd" },
        yaml            = { "prettierd" },
        ["*"]           = { "trim_whitespace" },
      },
      format_on_save       = {
        lsp_fallback = true,
        async        = false,
        timeout_ms   = 10000,
      },
      notify_on_error      = false, -- Conform will notify you when a formatter errors.
      quiet                = true,  -- Conform will suppress all output if quiet is true.
      notify_no_formatters = true,  -- Conform will notify you when no formatters are available for the buffer.
      formatters           = {
        prettierd = {
          condition = function()
            return vim.loop.fs_realpath(".prettierrc.js") ~= nil or vim.loop.fs_realpath(".prettierrc.mjs") ~= nil
          end,
        },
      },
    })

    vim.api.nvim_create_autocmd("BufWritePre", {
      pattern = "*",
      callback = function(args)
        require("conform").format({ bufnr = args.buf })
      end,
    })
    -- Create an augroup for the autocommands
    -- local group = vim.api.nvim_create_augroup("ConformAutoFormat", { clear = true })

    -- vim.api.nvim_create_autocmd({"BufEnter", "BufLeave"}, {
    --   group = group,
    --   callback = function(args)
    --     if vim.api.nvim_get_autocmds({ group = group, buffer = args.buf })[1] then
    --       require("conform").format({
    --         bufnr = args.buf,
    --         lsp_fallback = true,
    --         async = true,
    --         timeout_ms = 10000,
    --       })
    --     end
    --   end,
    -- })

    ---------------------------------------------------------------------------
    ----- Key Mappings

    vim.keymap.set({ "n", "v" }, "<leader>mp", function()
      conform.format({
        lsp_fallback = true,
        async = false,
        timeout_ms = 10000,
      })
    end, { desc = "Format file or range (in visual mode)" })
  end,
}

The parts I've tried so far (the rest that is there from my journey) are commented out. The part from your README.md is pasted above.
Sorry, if I've had steal your time for maybe something noobish like that :/

I don't know what you're trying to do with that if vim.api.nvim_get_autocmds({ group = group, buffer = args.buf })[1] then conditional, but if you remove it the rest of that autocmd looks like I would expect. If you put that into your config, what do you see in your logs?

@stevearc I've tried a little around and now I've got it :)
So I've commented this out in the require("conform").setup({...}) part:
-- format_on_save = {
--   lsp_fallback = true,
--   async        = false,
--   timeout_ms   = 10000,
-- },

...and reworked the part with the autocmd we've talked about.
Here is the (for me?!?) working solution, that I've put under the require("conform").setup({...}) part:
local group = vim.api.nvim_create_augroup("ConformAutoFormat", { clear = true })

vim.api.nvim_create_autocmd({"BufEnter", "BufLeave"}, {
  group = group,
  callback = function(args)
    if vim.api.nvim_buf_is_valid(args.buf) and vim.bo[args.buf].modifiable and vim.bo[args.buf].buftype == "" then
      require("conform").format({
        bufnr = args.buf,
        lsp_fallback = true,
        async = true,
        timeout_ms = 10000,
      })
    end
  end,
})

Maybe, if this works for other people too, it can be a future feature? ...sorry, I don't know yet how to write something like that for you and pass it as pull request, so that you can decide if it is a good idea.
However, I thank you so much, that you have taken your time for helping me - awesome - because of that it works now :)
...and thanks again for this great plugin!!

Glad you managed to figure it out! I don't think this makes sense as a feature, since it's kind of a niche use case and doesn't require much code to add the behavior yourself.


hwinfo: 21.38 -> 21.50

Motivation for this change
Update hwinfo and its libx86emu dependency to latest stable releases
Also fixed the pkgconfig .pc file of hwinfo (prefix was wrong)
Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

$ ./result/bin/hwinfo --version
21.50

$ ./result/bin/hwinfo --short
cpu:
                       Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz, 3200 MHz
                       Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz, 3200 MHz
                       Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz, 3200 MHz
                       Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz, 3200 MHz
keyboard:
[...]

/cc maintainer @bobvanderlinden

Applied to master (7a32e683938dda07590da2ddf23dae211b8b0c1d,<PHONE_NUMBER>36fd4901779532a0fcdb2fdb1e86e9). Thanks!

@bjornfor Did you not merge this because you've added a comment #enableParallelBuilding = true;? Does this mean that hwinfo fails to build in parallel?

I had that comment in the first place and then removed entirely it in a second push.
And it was commented because I did encountered failure to build hwinfo when trying to enable parallel building

I didn't change the PR, I rebased locally without doing any changes. I didn't notice to the commented line :-/


Error on recovery from hot exit for a basic notebook

Issue Type: Bug
I had a simple unsaved SQL notebook with a "select * from sys.databases" query open when I restarted my laptop for a Windows update. On reopen, the notebook did not open, but two errors were shown in the error pane. On clicking on the error, the notebook JSON opened as shown.

Notebook attached as .txt
notebook error.txt
Azure Data Studio version: azuredatastudio-insiders 1.14.0-insider (659f39219623b7005416f38ef3e8b50d064c9886, 2019-12-11T05:59:08.400Z)
OS version: Windows_NT x64 10.0.18363

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: enabledrasterization: enabledskia_renderer: disabled_offsurface_control: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.75GB (6.43GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions: none

I saw this one time last night as well.  But I didn't have a consistent repro.

I saw this once this afternoon when i killed the ADS process. not consistent otherwise, though. will move to Feb.

Closing older issues without recent repro reports.  Please reactive if you're still impacted by this bug.


Feature/issue 656

Bug fixes

Coverage decreased (-0.2%) to 73.207% when pulling e7aa9a8f103822f57a7699fa8a7d59ae610741c8 on feature/issue-656 into fd1f3df5fab315532bbcd86557fce11c9a540d2f on develop.


create bisonai contract addresses npm package

make it possible to access single source of truth through npm package import
following tasks would be removing all hardcoded addresses within docs and codes

closing since this functionality is implemented


Add globalkey to monorepo

also you probably want to add an action: globalkey-npm_deploy.yaml to publish to npm, you can copy/paste dolma-npm_deploy.yaml

yeah Ill do that

done.

VERY NICE!

ill merge this now as i saw ben comment earlier and it seems he's cool with it

Swag

swag


Describe process to deploy and standalone UI from Docker image

Is your feature request related to a problem?
This issue is a next step for deploying stand alone UI described here.
The request is to describe the process of how to compile and create a Docker image for deploying the latest standalone UI instead of making the process so manual.
Solution you'd like
No response
Alternatives you've considered
No response
Anything else?
No response

I think I can re-use https://github.com/epinio/ui-backend/blob/main/.github/workflows/release.yml to create a draft binary like I'm doing for epinio-server, I'll try it later.


converting python 2 pkl file to python 3 pkl file

Description
What steps will reproduce the problem?

An error ocurred while starting the kernel
2020󈚧󈛀 19:02:30.620117: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
Warning! HDF5 library version mismatched error
The HDF5 header files used to compile this application do not match
the version used by the HDF5 library to which this application is linked.
Data corruption or segmentation faults may occur if the application continues.
This can happen when an application was compiled by one version of HDF5 but
linked with a different version of static or shared HDF5 library.
You should recompile the application or check your shared library related
settings such as 'LD_LIBRARY_PATH'.
You can, at your own risk, disable this warning by setting the environment
variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
Setting it to 2 or higher will suppress the warning messages totally.

Traceback
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\psutil\_pswindows.py", line 679, in wrapper
    return fun(self, *args, **kwargs)
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\psutil\_pswindows.py", line 933, in create_time
    user, system, created = cext.proc_times(self.pid)
ProcessLookupError: [Errno 3] No such process (originated from GetExitCodeProcess != STILL_ACTIVE)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\psutil\__init__.py", line 373, in _init
    self.create_time()
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\psutil\__init__.py", line 723, in create_time
    self._create_time = self._proc.create_time()
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\psutil\_pswindows.py", line 681, in wrapper
    raise convert_oserror(err, pid=self.pid, name=self._name)
psutil.NoSuchProcess: psutil.NoSuchProcess process no longer exists (pid=15076)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\qtconsole\manager.py", line 27, in poll
    super(QtKernelRestarter, self).poll()
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\jupyter_client\restarter.py", line 113, in poll
    self.kernel_manager.restart_kernel(now=True, newports=newports)
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 411, in restart_kernel
    self.shutdown_kernel(now=now, restart=True)
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 371, in shutdown_kernel
    self._kill_kernel()
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\utils\manager.py", line 78, in _kill_kernel
    self.kill_proc_tree(self.kernel.pid)
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\utils\manager.py", line 44, in kill_proc_tree
    parent = psutil.Process(pid)
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\psutil\__init__.py", line 346, in __init__
    self._init(pid)
  File "C:\Users\JAYARAM\Anaconda3\lib\site-packages\psutil\__init__.py", line 386, in _init
    raise NoSuchProcess(pid, None, msg)
psutil.NoSuchProcess: psutil.NoSuchProcess no process found with pid 15076
WARNING:traitlets:kernel died: 45.00080728530884
WARNING:traitlets:kernel died: 45.00043344497681
WARNING:traitlets:kernel died: 45.000856161117554
WARNING:traitlets:kernel died: 45.000383377075195

Versions

Spyder version: 4.1.1
Python version: 3.7.7
Qt version: 5.12.7
PyQt5 version: 5.12.3
Operating System: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0           :  1.3.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.3.0 (OK)
diff_match_patch >=20181111    :  20181111 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.13.0 (OK)
jedi =0.15.2                   :  0.15.2 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  0.9.2 (OK)
paramiko >=2.4.0               :  2.7.1 (OK)
parso =0.5.2                   :  0.5.2 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.7.0 (OK)
pygments >=2.0                 :  2.6.1 (OK)
pylint >=0.25                  :  2.4.4 (OK)
pyls >=0.31.9;<0.32.0          :  0.31.9 (OK)
qdarkstyle >=2.8               :  2.8 (OK)
qtawesome >=0.5.7              :  0.7.0 (OK)
qtconsole >=4.6.0              :  4.7.2 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
rtree >=0.8.3                  :  0.9.3 (OK)
sphinx >=0.6.6                 :  2.4.4 (OK)
spyder_kernels >=1.9.0;<1.10.0 :  1.9.0 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  18.1.1 (OK)

# Optional:
cython >=0.21                  :  0.29.15 (OK)
matplotlib >=2.0.0             :  3.1.3 (OK)
numpy >=1.7                    :  1.18.1 (OK)
pandas >=0.13.1                :  1.0.3 (OK)
scipy >=0.17.0                 :  1.4.1 (OK)
sympy >=0.7.3                  :  1.5.1 (OK)

The first error is an installation issue with hdf5, so there's nothing we can do about it.
The second error is a duplicate of issue #11872 and it'll be fixed in our next version (4.1.2) to be released next week.


When -o is specified, the pdf generation function is broken

When -o is specified, the pdf generation function is broken

Thanks for reporting the bug!
This is now fixed with commit 6b60270. Closing this issue now.


I'm getting key error '2' when i run run_classifier.py

I got key error 2 when I ran run_classifier.py on my train.tsv file. I'm unable to figure out what could possibly be the reason for this error ? Could someone please help me fix this.
The error that i encountered is exactly :
INFO:tensorflow:_TPUContext: eval_on_tpu True
WARNING:tensorflow:eval_on_tpu ignored because use_tpu is False.
INFO:tensorflow:Writing example 0 of 13
INFO:tensorflow:*** Example ***
INFO:tensorflow:guid: train-0
INFO:tensorflow:tokens: [CLS] a [SEP]
INFO:tensorflow:input_ids: 101 1037 102 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
INFO:tensorflow:input_mask: 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
INFO:tensorflow:segment_ids: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
INFO:tensorflow:label: 1 (id = 1)
Traceback (most recent call last):
File "bert/run_classifier.py", line 981, in
tf.app.run()
File "/home/sneha/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "bert/run_classifier.py", line 870, in main
train_examples, label_list, FLAGS.max_seq_length, tokenizer, train_file)
File "bert/run_classifier.py", line 490, in file_based_convert_examples_to_features
max_seq_length, tokenizer)
File "bert/run_classifier.py", line 459, in convert_single_example
label_id = label_map[example.label]
KeyError: '2'
Thanks in advance !!

You are getting this error because the format of your train.tsv is incompatible with the task_name argument you specified for task classifier. Make sure the format of your train.tsv is compatible with the data processor associated with whatever task_name you specified.

@hsm207 @Sneha-Rao-GR
I had a similar issue once. I feel that the issue is not necessarily because of the data format.
In my case I had training data in the format of:
<ID>  <LABEL>  <THROW_AWAY>  <SENTENCE>
0              1                      a                 'Some random sentence'
Yet, I had this issue. After bit of digging, I realized that the run_classifier file is configured by default to work with binary classification, so when the classifier comes across any label beyong 0 or 1 it throws an error for obvious reasons, because of the way it's get_label function is coded.
So, go to -> BERT BASE FOLDER - > run_classifier.py - > get_label function and change it from:
 def get_labels(self):   """See base class."""     return ["0", "1"]
to
def get_labels(self): """See base class."""   return ["0", "1", "2", "3", "4", "5", "6", "7"]
I Hope it helps.

@amit8121 - Your comment solved the problem for me. Thanks a million!

@amit8121 - Your comment solved the problem for me. Thanks a million!

Glad I could help.

@amit8121 - how would you solve the same in bert pretrained model?

I am using tfhub module similar to the one in BERT repo example but I have used similar code snippet of train_features for generating test_features also because I have text_b content which is not none in my case. But I am getting a key error 0. I don't know where am i going wrong.
Thanks in advance
test = pd.read_csv('/content/drive/My Drive/Datasets/Test_set US_SUP.csv') test.fillna('No text',inplace=True)
DATA_COLUMN_TEST_A = 'content_A_test' DATA_COLUMN_TEST_B = 'content_B_test' LABEL_COLUMN = 'Labels_test' label_list_test = [x for x in np.unique(test.Labels_test)] print(label_list_test)
test_InputExamples = test.apply(lambda x: bert.run_classifier.InputExample(guid=None,                                                                    text_a = x[DATA_COLUMN_TEST_A],                                                                     text_b = x[DATA_COLUMN_TEST_B],                                                                     label = 0), axis = 1)
test_features = bert.run_classifier.convert_examples_to_features(test_InputExamples, label_list, MAX_SEQ_LENGTH, tokenizer)
Error:
INFO:tensorflow:Writing example 0 of 15
INFO:tensorflow:Writing example 0 of 15
KeyError                                  Traceback (most recent call last)
 in ()
----> 1 test_features = bert.run_classifier.convert_examples_to_features(test_InputExamples, label_list, MAX_SEQ_LENGTH, tokenizer)
1 frames
/usr/local/lib/python3.6/dist-packages/bert/run_classifier.py in convert_single_example(ex_index, example, label_list, max_seq_length, tokenizer)
457   assert len(segment_ids) == max_seq_length
458
--> 459   label_id = label_map[example.label]
460   if ex_index < 5:
461     tf.logging.info("*** Example ***")
KeyError: 0

Hello @ShrikanthSingh, I'm stuck with the same error, were you able to resolve that error?
Thank you

Hello @ShrikanthSingh, I'm stuck with the same error, were you able to resolve that error?
Thank you

Hi @AbhilashG97 I partially remember about resolving this error. Hence I think I figured it out by changing the labels from [1, 2, 3, 4, 5] to [0, 1, 2, 3, 4] because the enumeration for the labels in the run classifier starts from 0 and not from 1. But I am not sure of this solution, because it was long time back.

Hello @ShrikanthSingh, thank you so much, I was able to fix the error.
I did something quite stupid, I forgot to write the code to map my labels to integer numbers. I mapped my labels to integer numbers starting from 0 and it works fine now. :sparkles:

Hi, I got key error 4 when I ran run_classifier.py on the train.tsv file. Does anyone happen to know how to resolve this?
INFO:tensorflow:Writing example 0 of 145342
I0726 12:31:53.243687 13768 run_classifier.py:487] Writing example 0 of 145342
Traceback (most recent call last):
File "run_classifier.py", line 981, in
tf.app.run()
File "C:\Users\ll\anaconda3\lib\site-packages\tensorflow_core\python\platform\app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "C:\Users\ll\anaconda3\lib\site-packages\absl\app.py", line 299, in run
_run_main(main, args)
File "C:\Users\ll\anaconda3\lib\site-packages\absl\app.py", line 250, in _run_main
sys.exit(main(argv))
File "run_classifier.py", line 870, in main
train_examples, label_list, FLAGS.max_seq_length, tokenizer, train_file)
File "run_classifier.py", line 490, in file_based_convert_examples_to_features
max_seq_length, tokenizer)
File "run_classifier.py", line 459, in convert_single_example
label_id = label_map[example.label]
KeyError: '4'
Thanks in advance!

Hello @ShrikanthSingh, thank you so much, I was able to fix the error.
I did something quite stupid, I forgot to write the code to map my labels to integer numbers. I mapped my labels to integer numbers starting from 0 and it works fine now. ✨

@AbhilashG97 I encountered the same issue as @ShrikanthSingh and I even changed the the labels to integer starting from 0
df_v2.category = pd.Categorical(pd.factorize(df_v2.category)[0]) ![image](https://user-images.githubusercontent.com/57866492/98054382-b2afdd00-1e32-11eb-99f4-950a8a361e46.png)
Can you please tell me how do I overcome the same KeyError?


Get tests running on the 3.x branch.

... also, bump up to the newer versions of PHP.
What does this Pull Request do?
Provide a brief description of what the intended result of the PR will be and/or what
problem it solves.

Related GitHub Issue: (link)

Other Relevant Links: (Google Groups discussion, related pull requests,
Release pull requests, etc.)

What's new?
A in-depth description of the changes made by this PR. Technical details and
possible side effects.

Changes x feature to such that y
Added x
Removed y
Does this change add any new dependencies?
Does this change require any other modifications to be made to the repository
(i.e. Regeneration activity, etc.)?
Could this change impact execution of existing code?

How should this be tested?
A description of what steps someone could take to:

Reproduce the problem you are fixing (if applicable)
Test that the Pull Request does what is intended.
Please be as detailed as possible.
Good testing instructions help get your PR completed faster.

Documentation Status

Does this change existing behaviour that's currently documented?
Does this change require new pages or sections of documentation?
Who does this need to be documented for?
Associated documentation pull request(s): ___  or documentation issue ___

Additional Notes:
Any additional information that you think would be helpful when reviewing this
PR.
Interested parties
Tag (@ mention) interested parties or, if unsure, @Islandora/committers

The tests now run. #57 fixes the failing test.


aws_kms_decrypt_blocking API does not support rsa decryption because it cannot receive key-id and encryption-algorithm

Because we utilize E2EE with RSA public key encryption, we need rsa decryption through kms inside the enclave.
However, the aws_kms_decrypt_blocking api does not support this.

Included in v0.3.0


test: fix TestOSExitNotAllowed to handle empty GOROOT

When tests are ran the -trimpath flag runtime.GOROOT() returns an empty string. This causes TestOSExitNotAllowed to fail because build.Context.ImportDir() cannot find packages in the standard library (without GOROOT it does not know where to look - see issue https://github.com/junegunn/fzf/issues/3748). This commit fixes that by falling back to go env GOROOT if runtime.GOROOT() returns an empty string. This works because go env GOROOT performs more work to identify the GOROOT than runtime.GOROOT().
This should fix https://github.com/junegunn/fzf/issues/3748.

Thanks for working on this :)

Merged, thanks!


Failed to load plugin react even when 'eslint-plugin-react' is installed globally?

The extension keeps giving me the error "Failed to load plugin react: Cannot find module 'eslint-plugin-react'" even when I have installed 'eslint-plugin-react' is installed globally.
Here is my config file .eslintrc.
{
	/* See all the pre-defined configs here: https://www.npmjs.com/package/eslint-config-defaults */
	"extends": "defaults/configurations/eslint",
	"parser": "babel-eslint",
	"ecmaFeatures": {
		"jsx": true
	},
	"plugins": [
		"react"
	],
	"env": {
		"amd": true,
		"browser": true,
		"jquery": true,
		"node": true,
		"es6": true,
		"worker": true
	},
	"rules": {

		"eqeqeq": 2,
		"comma-dangle": 1,
		"no-console": 0,
		"no-debugger": 1,
		"no-extra-semi": 1,
		"no-extra-parens": 1,
		"no-irregular-whitespace": 0,
		"no-undef": 0,
		"no-unused-vars": 0,
		"semi": 1,
		"semi-spacing": 1,
		"valid-jsdoc": [
			2,
			{ "requireReturn": false }
		],

		"react/display-name": 2,
		"react/forbid-prop-types": 1,
		"react/jsx-boolean-value": 1,
		"react/jsx-closing-bracket-location": 1,
		"react/jsx-curly-spacing": 1,
		"react/jsx-indent-props": 1,
		"react/jsx-max-props-per-line": 0,
		"react/jsx-no-duplicate-props": 1,
		"react/jsx-no-literals": 0,
		"react/jsx-no-undef": 1,
		"react/jsx-sort-prop-types": "off",
		"react/jsx-sort-props": 0,
		"react/jsx-uses-react": 1,
		"react/jsx-uses-vars": 1,
		"react/no-danger": 1,
		"react/no-did-mount-set-state": 1,
		"react/no-did-update-set-state": 1,
		"react/no-direct-mutation-state": 1,
		"react/no-multi-comp": 1,
		"react/no-set-state": 0,
		"react/no-unknown-property": 1,
		"react/prop-types":0,
		"react/react-in-jsx-scope": 0,
		"react/require-extension": "off",
		"react/self-closing-comp": 1,
		"react/sort-comp": 1,
		"react/wrap-multilines": "off"
	}
}

The command I ran to install ESLint and its dependencies was
npm install -g eslint eslint-plugin-react babel-eslint eslint-config-defaults
Running the eslint command from the command line appears to be able to lint files correctly. However, the extension completely does not work and displays the following in the Output tab:
[Info  - 8:15:58 PM] ESLint server running in node v8.9.3
[Info  - 8:15:58 PM] ESLint server is running.
[Info  - 8:16:03 PM] ESLint library loaded from: c:\Users\yip\side-project\node_modules\eslint\lib\api.js
[Error - 8:16:03 PM]
Failed to load plugin react: Cannot find module 'eslint-plugin-react'
Happened while validating C:\Users\yip\side-project\main.js
This can happen for a couple of reasons:
1. The plugin name is spelled incorrectly in an ESLint configuration file (e.g. .eslintrc).
2. If ESLint is installed globally, then make sure 'eslint-plugin-react' is installed globally as well.
3. If ESLint is installed locally, then 'eslint-plugin-react' isn't installed correctly.

Consider running eslint --debug C:\Users\yip\side-project\main.js from a terminal to obtain a trace about the configuration files used.
[Info  - 8:22:37 PM] ESLint library loaded from: C:\Users\yip\AppData\Roaming\npm\node_modules\eslint\lib\api.js

I am using ESLint version 5.4.0.
Thank you for reading this really long issue and I really am sorry for your trouble.

@HoWingYip thanks for the issue. Can you provide me with a GitHub repository I can clone that demos this?

@dbaeumer https://github.com/HoWingYip/side-project here's the repository I was working on when I discovered this problem

I cloned the project and I get
[Info  - 11:39:16 AM] ESLint server running in node v8.9.3
[Info  - 11:39:16 AM] ESLint server is running.
[Info  - 11:39:18 AM] ESLint library loaded from: c:\Users\dirkb\Projects\mseng\VSCode\Playgrounds\Bugs\eslint\side-project\node_modules\eslint\lib\api.js
[Warn  - 11:39:18 AM]
No ESLint configuration (e.g .eslintrc) found for file: c:\Users\dirkb\Projects\mseng\VSCode\Playgrounds\Bugs\eslint\side-project\main.js
File will not be validated. Consider running 'eslint --init' in the workspace folder side-project
Alternatively you can disable ESLint by executing the 'Disable ESLint' command.

Oh dear, I suppose it's my problem then. Do you have any idea what's wrong?

ESLint requires and .eslintrc file to work correctly. You can create one using eslint --init in a terminal.


Failed when running make

[x] I have read the contribution documentation for this project.
[x] I agree to follow the code of conduct that this project follows, as appropriate.
[x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:
Failed with electron-forge make, but succeeded in electron-forge start and electron-forge package

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +172ms
  electron-forge:runtime-config setting key: verbose to value: false +15ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Resolving Forge Config +0ms
  electron-forge:project-resolver searching for project in: C:\Users\Administrator\electron\projects\spider +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in C:\Users\Administrator\electron\projects\spider\package.json +0ms
  electron-forge:lifecycle Process Succeeded: Resolving Forge Config +16ms
We need to package your application before we can make it
  electron-forge:lifecycle Process Started: Preparing to Package Application for arch: x64 +0ms
  electron-forge:project-resolver searching for project in: C:\Users\Administrator\electron\projects\spider +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in C:\Users\Administrator\electron\projects\spider\package.json +0ms
  electron-forge:packager packaging with options { asar: false,
  overwrite: true,
  afterCopy: [ [Function], [Function], [Function], [Function] ],
  afterExtract: [],
  dir: 'C:\\Users\\Administrator\\electron\\projects\\spider',
  arch: 'x64',
  platform: 'win32',
  out: 'C:\\Users\\Administrator\\electron\\projects\\spider\\out',
  electronVersion: '1.6.2',
  quiet: true } +0ms
  electron-forge:lifecycle Process Succeeded: Preparing to Package Application for arch: x64 +12s
  electron-forge:lifecycle Process Started: Compiling Application +0ms
[BABEL] Note: The code generator has deoptimised the styling of "C:/Users/ADMINI~1/AppData/Local/Temp/electron-packager/win32-x64/spider-win32-x64/resources/app/src/app/mods/echart/echarts.min.js" as it exceeds the max of "500KB".
  electron-forge:lifecycle Process Succeeded: Compiling Application +7s
  electron-forge:lifecycle Process Started: Preparing native dependencies +0ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +453ms
  electron-forge:lifecycle Process Started: Packaging Application +16ms
  electron-forge:lifecycle Process Succeeded: Packaging Application +13s
Making for the following targets:
  electron-forge:lifecycle Process Started: Making for target: squirrel - On platform: win32 - For arch: x64 +15ms
  electron-forge:require-search searching [ '../makers/win32/squirrel.js',
  '../makers/generic/squirrel.js',
  'electron-forge-maker-squirrel',
  'squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\node_modules\\squirrel',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\makers\\win32\\squirrel.js',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\makers\\generic\\squirrel.js',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\electron-forge-maker-squirrel',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\node_modules\\squirrel',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\makers\\win32\\squirrel.js',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\makers\\generic\\squirrel.js',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\node_modules\\electron-forge-maker-squirrel',
  'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\electron-forge\\dist\\api\\node_modules\\squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\squirrel',
  'C:\\Users\\Administrator\\electron\\projects\\spider\\node_modules\\squirrel' ] relative to C:\Users\Administrator\AppData\Roaming\npm\node_modules\electron-forge\dist\api +47ms
  electron-forge:require-search testing ../makers/win32/squirrel.js +0ms
  electron-forge:lifecycle Process Failed: Making for target: squirrel - On platform: win32 - For arch: x64 +2s

An unhandled error has occurred inside Forge:
An error occured while making for target: squirrel
Failed with exit code: 1
Output:
���ڳ��Դӡ�spider.nuspec�����ɳ�������
��·����C:\Users\Administrator\electron\projects\spider\out\spider-win32-x64\resources\app\node_modules\array-differ���ķ��ʱ��ܾ���

Error: Failed with exit code: 1
Output:
���ڳ��Դӡ�spider.nuspec�����ɳ�������
��·����C:\Users\Administrator\electron\projects\spider\out\spider-win32-x64\resources\app\node_modules\array-differ���ķ��ʱ��ܾ���

    at ChildProcess.proc.on.code (C:\Users\Administrator\AppData\Roaming\npm\node_modules\electron-forge\node_modules\.2.5.2@electron-winstaller\lib\spawn-promise.js:62:16)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:886:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

What command line arguments are you passing?
electron-forge make

What does your config.forge data in package.json look like?
  "forge": {
      "make_targets": {
        "win32": ["squirrel"]
      },
      "electronPackagerConfig": {},
      "electronWinstallerConfig": {
        "name": "spider"
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "",
        "name": ""
      },
      "windowsStoreConfig": {
        "packageName": "",
        "name": "spider"
      }
    }

Thanks in advance !

Can you post the output of running make with DEBUG set like so
DEBUG=electron-windows-installer*,electron-forge*

I have fixed this issue by removing and reinstalling "node_modules" with NPM.
So it may be caused with network or NPM during installing dependencies.
Please close this issue.
Thanks anyway.

FYI, you should have been able to close this yourself, since you're the issue reporter.

Having the exact same issue. Reinstalling does not work.

@ruvenss See the response I gave in the issue you filed, #307.

I also facing this problem, and tried to re-install  node_modules, but still not work,
any one successfully solved this? how

Hello everyone. I've solved with docker. I used this Windows container: https://hub.docker.com/_/microsoft-windows

@waghcwb it would help to know what the actual error is, because it sounds like it can't find a certain binary needed for the maker you're using, for some reason.

I had to spearately install winstaller for electron.
npm install --save-dev electron-winstaller

This also happens when using yarn with nodeLinker not set to node-modules. The package isolation prevents the  Maker#isInstalled check from succeeding because it tests by trying to require the module which will never work unless the specified module (electron-winstaller in this case) is added to package.json.
electron-winstaller is currently specified as an optional dependency in @electron-forge/maker-squirrel. I'm not sure if this issue is fixed if @electron-forge/maker-squirrel specifies it as a normal dependency instead but I don't think it makes sense to make electron-winstaller optional anyhow as @electron-forge/maker-squirrel is only applicable on Windows.


Implement StringUtils.interpolateEscape utility

https://openedx.atlassian.net/browse/UITK-74
This PR adds a new StringUtils class to the UI Toolkit, with two functions:

HTML(text) - wraps a known piece of HTML so that it doesn't get double escaped
interpolateEscape(string, options) - returns an HTML-escaped string where the interpolation escapes each option unless it is an instance of an HTMLSnippet (the result of calling HTML)

Note that we have gone around and around on the name of the helper function. I think it is important that it include the word escape as its behavior is to return an HTML-escaped string, so I ended up going with Robert's original suggestion.
Once this version of the UI Toolkit has been released, I'll make another PR against edx-platform which will bring in this function and replace all usages of StringUtils.interpolate_text with this new, safer function. We will then update the XSS guidelines to advise folks to use this function instead of any of the alternatives, i.e. interpolate, interpolate_text and _.template.
@AlasdairSwan @robrap please review.
FYI @dan-f @nedbat @cahrens

PR Cover Letter

[ ] A detailed description of the changes in the body of the PR
[ ] If available, a link to the relevant JIRA ticket in the body of the PR

[PROJ-XXXX](https://openedx.atlassian.net/browse/PROJ-XXXX)

Sandbox

[ ] Build a sandbox for your branch and add a link here

Testing

[ ] i18n
[ ] RTL
[ ] Unit, integration, acceptance tests as appropriate
[ ] Analytics
[ ] Performance
[ ] Database migrations are backwards-compatible

Reviewers
If you've been tagged for review, please check your corresponding box once you've given the :+1:.

[ ] Code review #1
[ ] Code review #2
[ ] Docs review (required for UI strings/error messages)
[ ] UX review
[ ] Accessibility review
[ ] Product review

Documentation considerations

[ ] Are there user visible changes? If so, list who is affected, and include a pointer to the relevant code.
[ ] Should this be mentioned in the release notes? If so, make sure that you included a description.

DevOps assistance
If it's needed, or even if you suspect it might be needed, do any/all these things as early as possible. Don't surprise devops right before merging! For example, touching envs/aws.py or or envs/common.py are dead giveaways that you'll need assistance when pushing your changes out. Things that require devops attention include, but are not limited to:

configuration changes
feature flags
migrations
Ways to get devops attention, pick-and-choose whichever is most appropriate for your specific PR:
[ ] Tag devops on your PR (@edx/devops), either for review (more specific to devops = better) or just a general FYI
[ ] File a support ticket

FYI: Tag anyone who might be interested in this PR here.
Post-review

[ ] Squash commits

@andy-armstrong This looks great.  Only some very minor comments.

 I'm still not on board with interpolateEscape because I feel that it highlights an implementation detail over the actual use case. From a developer (user) perspective, I want to interpolate some HTML strings, and the escaping should Just Work™.
From this perspective, I'd like to propose interpolateHtml as the new name for this method because that's what we're actually doing; interpolating an HTML string, where escaping - an implementation detail - is handled by the implementation of the API.

@dan-f Naming is both important and hard so I appreciate your perseverance. :-) I initially proposed interpolateHtml yesterday when I started this, but @robrap convinced me that other JS functions don't have HTML in the name e.g. _.escape is HTML escaping, but it is focused on the action not the content type.
One aspect to this is that interpolateHtml reads like an action, while interpolateEscape isn't really even a phrase. The former seems a more pleasing name, which must count for something. :-) In Java, the basic escape function is called escapeHTML which does seem clearer, because you can escape URLs or other formats too.
All this is to say that I think I'm now with you @dan-f . @robrap @AlasdairSwan @nedbat do you have strong preferences either way? Any other name that you think would work better?

Thanks for the thoughtful response, @andy-armstrong! +1 on interpolateEscape not being a phrase.
I see where you're coming from on the whole not calling out the content type, but I also like the idea of eventually having interpolation functions for URLs; we could have a StringUtils.interpolateURI which has a similar API but uses a URI constructor and wraps up encodeURIComponent.

@dan-f After trying this refactoring, I'm now tempted to rename the file to html-utils.js since all of the functions are to do with managing HTML. It would then look like HtmlUtils.interpolateHtml and HtmlUtils.HTML(''). Thoughts?

@dan-f pointed out to me that if the class is HtmlUtils then we don't need the suffix in the name. So how about HtmlUtils.interpolate? The name seems unambiguous that this function is the correct interpolation function to use when handling HTML.

I like HtmlUtils.interpolate & HtmlUtils.Html.

I'm fine with HtmlUtils.interpolate & HtmlUtils.HTML.  @dan-f We intentionally decided to go with all-caps for the HTML method because we liked how it looked better, but it may be different here if it is following HtmlUtils. @nedbat Thoughts?
Also, is everyone fine with HtmlUtils.HtmlSnippet, or are there opinions on that as well?

I prefer Html over HTML since 1) we're distinguishing between JS name, not a general acronym, and 2) it's easier to type. In fact, I now wonder if HtmlUtils.Html should actually be HtmlUtils.html since it's a factory function rather than a constructor.
I don't mind HtmlUtils.HtmlSnippet though I also like HtmlUtils.HtmlString as it's a bit shorter and a little bit more specific. I don't mind the distinction here though.
Sorry for being so much trouble! :)

OK I have another idea. Sorry folks. Really! Sorry for the churn!
I want to challenge whether we need both a HTML factory function and an interpolateHtml function. Instead, I'll propose a polymorphic function named Html. With a single argument, it returns that string (just like the HTML factory currently does). With a second interpolation argument, it does the interpolation:
var Html = require('html-utils').Html;

Html('Please click on {linkStart}this awesome link{linkEnd}.', {
    linkStart: Html(''),
    linkEnd: Html('')
})

Html('Also check out not-prone we are to XSS: {htmlText}', {
    htmlText: ''
})

I think we need 2 calls.  It does not make sense to me that this would escape the &:
Html('Please click on {linkStart}this great & awesome link{linkEnd}.', {
    linkStart: Html(''),
    linkEnd: Html('')

But, this would not escape the &:
Html('This is a great & awesome example.')

Also, we went for capitalization because we wanted it to be more declarative.  It just feel more right to me to use Html('') than `html('') in this case, even though we are forcing the capitalization a bit.

@robrap @dan-f @AlasdairSwan Thanks for the reviews. I've pushed up a commit which addresses most of the feedback. We will need to chat more on Monday to settle upon the name of the HTML factory method. I've currently left it as it was.

:+1: once we figure out names!

Thanks @andy-armstrong.  This looks great to me.  I left 2 very minor comments.  :+1:  with those changes.  I'm happy with the current names.
That said, I have one possible additional enhancement.  Let's say we have the following example:
HtmlUtils.interpolate(
    gettext('You are enrolling a Rock & Roll star!')
)

This does exactly what we want, but the name interpolate() doesn't make a lot of sense because there is no interpolation needed.  We need to document what we'd expect to see used here.  One alternative that would work is:
_.escape(
    gettext('You are enrolling a Rock & Roll star!')
)

I'd propose we also have HtmlUtils provide the same so we can use it as an option (and as the best practice):
HtmlUtils.escape(
    gettext('You are enrolling a Rock & Roll star!')
)

I'd like your thoughts on this.  Do you agree, or would you prefer to keep _.escape() as the existing alternative because it is possibly well known and already documented as part of underscore?
Thanks.

@robrap I really liked your suggestion of providing HtmlUtils.escape as a first class function. It isolates our best practices from Underscore (which we might drop at some point). More importantly, I found that it is useful to be able to pass HtmlSnippets to escape and have them pass through without being escaped again. In fact, having this method allowed me to remove the rather ugly internal method escapeInterpolateParameters with just _.mapObjects(parameters, escape). I'm also going to be using this method in edx-platform for exactly the use cases you describe, and in some of them the code won't know whether it has a raw string or an HtmlSnippet.
@robrap @dan-f @AlasdairSwan please re-review.

@dan-f I've been thinking through the naming options for HtmlUtils.HTML. I don't think we can use HtmlUtils.Html because that naming convention should indicate that Html is a class but it isn't. For example, JSHint complains about a class being constructed without using the new operator. HtmlUtils.html would be okay from a naming convention, but I find that it doesn't stand out enough. My current leaning is to go with @robrap's original proposal of HTML both because it stands out and because it mirrors what we're doing in Python.
Let me know if this works for you or not.

@robrap @dan-f In working on the conversion of some of edx-platform, I'm starting to see a need for a non-HTML interpolate function. There are places where the code needs to create a text string and it is not going to be used as HTML. For example:
https://github.com/edx/edx-platform/blob/master/lms/djangoapps/teams/static/teams/js/views/edit_team_members.js#L50
I started to convert these functions over to use HtmlUtils.interpolate but the code didn't read correctly because it was jarring to see mention of HTML. However, I'd like to use the same syntax for consistency.
What would you think of also having StringUtils.interpolate which is a pure interpolation function that has nothing to do with HTML? Would that be confusing because there are two similar functions, or would it be less confusing because otherwise folks are relying on interpolate in the global namespace which has a somewhat confusing syntax?
I wonder if it would be possible to share logic between the two functions too, or whether that would just be too contrived.

@andy-armstrong Thanks for your continued work on this.  I must have felt it because I woke up earlier thinking about this and finally got up to comment about some of the same things.  Also, thank you for actually putting your method to use to help discover these issues early.  :)
It struck me, as it did you, that _.escape() and HtmlUtils.escape() would be different in that the latter would recognize an HtmlSnippet, and that this difference is important and useful.  In the markupsafe library we use in Python, it uses this same convention.  In other words, it has an escape() method that won't double-escape if it is being passed Markup, which is the equivalent of an HtmlSnippet.  So again, I'm fine with the name escape().
I'm on board with almost all existing names, except I think we may need to go with HtmlUtils.interpolateHtml() and StringUtils.interpolate().  Especially for cases where the function is put into a variable, I think we'd want people to use interpolate and interpolateHtml to mean different things.  The only way to somewhat enforce this naming convention would be through the different function names to begin with.  I guess I don't know how often this is done, and how often one would see interpolate() (using the old name) separate from HtmlUtils?
Note that the linter will help enforce some of this.  For example, in Underscore.js templates we could dictate:
// Since "<%-" escapes, the linter would be happy with anything here except those methods found below
<%- ... %>

// Since "<%=" does not escape, the linter would be ok with the following:
<%= HtmlUtils.interpolateHtml(...) %>
<%= interpolateHtml(...) %>
<%= HtmlUtils.escape(...) %>
<%= escape(...) %>
<%= _.escape(...) %>

// The linter would NOT be ok with the following:
<%= interpolate(...) %>

// If we wanted to stick with "HtmlUtils.interpolate", the linter would instead be ok with the following:
<%= HtmlUtils.interpolate(...) %>

So, the linter can help somewhat in an Underscore.js Template file, but it is going to have a much more difficult time in a plain old JavaScript file.  So, I'll start with a vote for HtmlUtils.interpolateHtml().

@robrap Thanks for the great suggestions. I've introduced StringUtils.interpolate and renamed the original method to HtmlUtils.interpolateHtml. It turned out to be very simple to implement the latter in terms of the former too.
One thing that we should discuss is how developers should handle escaping and/or interpolation in Underscore templates. The challenge is that none of these helpers are available in the global namespace, so it isn't straightforward to access them. The simplest thing to do would be to have the client code pass HtmlUtils through to the template. However, this would only be a best practice and would require every developer to think of it. We could have them use require directly in the template, but I don't know whether RequireJS Optimizer will be able to handle that appropriately (we would have to try). @AlasdairSwan and @dan-f, do you have any suggestions?

@andy-armstrong Thanks.  I'm open to whatever you think will work in practicality.  I know @dan-f doesn't like the idea of extending underscore, but clearly enough people wanted this that it is available through the library using mixin.
Would something like _.HtmlUtils or _.edX.HtmlUtils make sense as a simple name-spaced solution that provides easy access?  I'm just throwing out ideas.  I do want it to be relatively simple for developers to use what they need.  I assume that this is just the first of many things you are going to want to easily make available.

:+1: on HtmlUtils.HTML as the factory function to return html safe text.
:+1: on HtmlUtils.escape as a function which smartly escapes and never double-escapes.
As for StringUtils.interpolate - I'd argue that we don't need. 90% of the time that we interpolate a string, we are preparing a string for the user to see. So it's going to end up in HTML. Hence when we do the interpolation, we want to mark HTML-safe strings with the HTML factory. So your example would become:
var HtmlUtils = require('HtmlUtils'),
    interpolate = HtmlUtils.interpolate,
    HTML = HtmlUtils.HTML;

_.each(this.model.get('membership'), function(membership) {
    dateJoined = interpolate(
        // Translators: 'date' is a placeholder for a fuzzy, relative timestamp (see: https://github.com/rmm5t/jquery-timeago)
        gettext("Joined %(date)s"),
        {date: HTML(self.dateTemplate({date: membership.date_joined}))}
    );

@andy-armstrong - I've started following a pattern in which string interpolation/preparation happens exclusively in JS, not in the template, which avoids this issue. I think that to me, it counts as view logic; the logic where we decide what to present to the user. I like the template to be lightweight and simply determine how that information is presented to the user.

@dan-f The need for StringUtils.interpolate is when you are building up a string for some other purpose than HTML, e.g. to post it to AJAX, or to write it to the console, or any host of other reasons. It also might be an intermediate text string that will eventually be placed into HTML but might not be. I found that using HtmlUtils.interpolateHtml for such code just read as incorrect, and I think it would be functionally incorrect too if it was then used in a non-HTML context.
If it would help, you can see a number of such usages as I'm cleaning up teams to use these new functions:
https://github.com/edx/edx-platform/pull/11799/files

@robrap @dan-f @AlasdairSwan I've pushed up another change which introduces a new HtmlUtils.template function. This wraps _.template but passes in the variable HtmlUtils so that all templates have access to these utilities. In addition, it returns an HtmlSnippet so that any consumers know that the result has already been escaped appropriately.
Please re-review at your convenience.

@dan-f I spoke with @robrap about your suggestion of doing the interpolation and escaping in JavaScript. His recommendation is that the code always escapes only when the context is known, so his preference is to escape in the template. His concern with your approach is that all Underscore templates will have to use <%= and assume that the parameters passed in were appropriately escaped. This will also make it impossible for his linter to detect XSS problems.
We decided to add HtmlUtils.template to make it easy for templates to do this. I'm going to try using it and see whether it helps or not.

@bjacobel FYI this is the XSS PR that I'm currently working on.

Looks good @andy-armstrong :+1:

Based on the discussion, the linter would be ok with <%= (which does not escape), when used with the following:
<%= HtmlUtils.interpolateHtml(...) %>
<%= HtmlUtils.escape(...) %>
<%= HtmlUtils.HTML(...) %>
<%= _.escape(...) %>

:+1: Nice job.  Thanks!

@andy-armstrong and @robrap: I agree that you should always escape as close to the context/template as possible. You can still do so in JS:
var template = _.template(templateName);
var message = interpolate(...);
this.$el.html(template({message: message}));

@dan-f The problem with this is that the template has to now assume that the parameter it receives is escaped. So the template will have to use:

<%= message %>

and that is precisely what @robrap's new linter will flag as being a potential issue. We want templates to default to safe (i.e. use <%-) except in a few limited situations.
One way to combine your approach and still be safe is to use HtmlUtils.interpolateHtml in the JavaScript and then do the following in the template:

<%= HtmlUtils.escape(message) %>

This template will then escape all raw strings, but will allow previously escaped HtmlSnippets to come through as is. This also won't cause an exception with the linter as HtmlUtils.escape is one of the known-to-be-safe patterns. Does that seem like a good compromise?
@robrap and I are going to be updating the best practice documentation to make all of this explicit for next week's XSS marathon.