WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Describe the bug

Form uploads appear to have broken between v0.26 and v0.27. Requests that used to work without issue no longer work.

Here is sample code that accepts a file and attempts to upload it to Cloudinary using form data.

export const upload = (file) => {
const formData = new FormData();
formData.set("file", file);
formData.set("upload_preset", CLOUDINARY_UPLOAD_PRESET);

return axios.post(
`https://api.cloudinary.com/v1_1/${CLOUDINARY_CLOUD}/upload`,
formData
);
};

Inspecting the v0.26 request in with Chrome shows that it at least understands the content provided:

Inspecting the v0.27 request in Chrome it appears to show more raw data - as if the form data wasn't handled correctly and is corrupted.

I've attempted to use the alternate FormData syntax for v0.27 as suggested in the documentation but I have the same issue.

export const upload = (file) => {
return axios.post(`https://api.cloudinary.com/v1_1/${CLOUDINARY_CLOUD}/upload`, {
file: file,
upload_preset: CLOUDINARY_UPLOAD_PRESET
}, {
headers: {
"Content-Type": "multipart/form-data"
}
});
};

To Reproduce

I couldn't get this running on RunKit because it's a Node environment, where my issue is in the browser using the native FormData vs the form-data npm package. However, the code below can be used (making a dummy request to /api) that would demonstrate the difference in request handing between the two affected versions.

export const upload = (file) => {
const formData = new FormData();
formData.set("file", file);
formData.set("additional_parameter", "additional_parameter");

return axios.post("/api", formData);
};

Expected behavior

I would have expected the request with form data that worked in v0.26 to continue to work in v0.27 without issue.

Environment

Axios Version 0.27

Browser: Chrome

Browser Version: 100

Node.js Version: 18.0.0

OS: maxOS 12.3.1

Additional context/Screenshots

Add any other context about the problem here. If applicable, add screenshots to help explain.

Issue 2:
Summary

After upgrade from 0.16.2 to 0.17.0 I got error window is undefined when running in web worker at line:

axios/lib/adapters/xhr.js

Line 27
in
2c0e318

if (!window.XMLHttpRequest &&

Changing order of conditions typeof window !== 'undefined' and !window.XMLHttpRequest fixes the error.

Context

axios version: 0.17.0

Environment: web worker in Chrome

Notes

looking closer ar xhr.js:

typeof window checks could be probably replaced with typeof XMLHttpRequest and typeof btoa

There is new XMLHttpRequest() few lines prior !window.XMLHttpRequest check. I would expect, in case !window.XMLHttpRequest is true, new XMLHttpRequest() will throw error before the check and the check is never performed
Issue 1:
❓ Questions & Help

I am trying to fine-tune XLM on the SQuAD dataset.

The command is as following:

[CUDA_VISIBLE_DEVICES=0 python run_squad.py --model_type xlm --model_name_or_path xlm-mlm-tlm-xnli15-1024 --do_train --do_eval --train_file $SQUAD_DIR/train-v1.1.json --predict_file $SQUAD_DIR/dev-v1.1.json --per_gpu_train_batch_size 12 --learning_rate 3e-5 --num_train_epochs 100 --max_seq_length 384 --doc_stride 128 --eval_all_checkpoints --save_steps 50 --evaluate_during_training --output_dir /home/weihua/Sqad/transformers/xlm_out/ ]

All the parameters I set are in accordance with the example in the pytorch-transformers document. But Exact and F1 scores have barely increased. And the loss of each epoch also drops very slowly. Each epoch drops by about 0.01.

Is there a problem with my parameter settings? Or do I need to adjust some parts of the model when I use XLM?

Issue 2:
Feature request

Similarly to the max_new_tokens, a min_new_tokens option would count only the newly generated tokens, ignoring the tokens of the input sequence (prompt) in decoder only models.

Motivation

The option min_length of the generate() method might be ambiguous for decoder only models. It is not clear if decoder only models consider the length of the input (prompt) for the min_length condition or only the newly generated tokens.

In Encoder Decoder (seq2seq) it is clear though.

Your contribution

Not that I remember. But I could test it.
Issue 1:
I'm working on an application with many different code paths that load textures and I've patched the WebGLRenderer to cache textures also on the GL level, so that uploadTexture and onTextureDispose use a dictionary to see if a texture has aleady been uploaded or are no longer used, which can reduce VRAM usage and does not need sweeping changes in other parts of the code.

Is that a useful thing for others, too? Or is there side-effects I'm missing / is it too specific to be useful within three.js?

Issue 2:
Description of the problem

When entering VR mode, VREffect sets the pixel ratio to 1. It saves a backup of the original value as rendererPixelRatio so it can set it back to what it was when exiting VR presentation. However, with the webvr-polyfill, both the full screen event handler and vrdisplaypresentchange fire, so whichever one runs second will overwrite rendererPixelRatio with 1.

Since there's a lot of repeated code in the two event handlers, I propose unifying them into a single function. At the top of that function, we'll check if the value of isPresenting is the same as it was before and abort if the values match. That way, we avoid running the same code twice.

Three.js version

Dev

r76

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

Linux

Android

IOS

Hardware Requirements (graphics card, VR Device, ...)

webvr-polyfill and a mobile browser
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Page should render

Current Behavior

Page is not rendering. Instead giving error that The default export is not a React Component in page: "/"

Steps to Reproduce (for bugs)

Update to Next 5 using command from blog: npm i next@latest react@latest react-dom@latest

I reduced my page to this, and still got error:

export class MyComp extends React.Component {
render() {
return (
<div>
Hello World
</div>
)
}
}

export default MyComp;

Context

Your Environment

Tech
Version

next
5.0.0

node
9.4.0

OS
Mac

browser
All

react
16.2.0

react-dom
16.2.0

Issue 2:
There are many tags in the HTML which NextJS generates which contain absolute URLs. For example:

href="/_next/blah"

I've added selenium + chrome headless testing to my Next project, and it works fine when I test http://localhost:3000, but when I do a next export, and then try to to test file:///home/user/project_dir/out/index.html, all of those absolute links are broken.I.e, it tries to fetch file:///_next/blah instead of: file:///home/user/project_dir/out/_next/blah.

If I post-edit the generated HTML to make those links relative, then it all works fine.

I need to be able to run my tests against the static files which are generated by export to ensure that they have been generated correctly before publishing.

I suspect this is also an issue when people simply wish to run their nextjs application from a location other than the root of their website.

I have searched the issues of this repository and believe that this is not a duplicate.

Your Environment

Tech
Version

next
v3.0.1-beta.15

node
v8.1.3

OS
Debian 9

browser
Google Chrome 59.0.3071.115
Issue 1:
Do you want to request a feature or report a bug?

This is a bug.

What is the current behavior?

When rendering a range input element, the value of the input isn't set on the initial render. You have to call render again for the value to get picked up.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/reactjs/69z2wepo/).

I've created a demo here, https://jsfiddle.net/caozilla/qchxo3qb/4/.

The demo includes a component called Test which simply renders an range input component by passing some props. There is an update button which calls setState and should trigger the render. There are also console.log statements which show the values being used during the render.

When you run the demo you'll notice that you have to click the update button twice before the input value updates. The strange thing is that it seems to have something to do with the min and max attributes of the input. There is a commented out line where it does var max = 100 and that seems to work fine on initial render. But when it references the state value, it doesn't work.

What is the expected behavior?

The input value should be set properly on initial render.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

This affects React 15.2.0. It works fine in 15.1.0. I've only tested on the latest Chrome.

Issue 2:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

React at the beginning rounds input[type=range] value to 0 or 1, and then looks at step parameter which is 0.1 for example. The result is incorrect value of input after component mounts. When I put value attribute after step attributes, it works fine.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/reactjs/69z2wepo/).

Demo: https://jsfiddle.net/2Lm4gy5k/ Comment or uncomment line 13 and 14 to see the difference.

What is the expected behavior?

To always look at step parameter and then round the value (if required).

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

v15.1.0 (Opera, Chrome, Firefox).

Yes, works in v.0.14.0 (https://jsfiddle.net/wrcnLugd/)
Issue 1:
More informations on http://docopt.org/.

Dump to docopt: #6339, #6329

Issue 2:
The whole thing already feels like docopt a bit - but by changing a few things, adding default values etc I think we could do better.

Another thing that might be good in addition to having ->setHelp() in the commands is a ->setUsage() that would take an array of usage examples that can be dumped on top of the help text in the Usage section.
Issue 1:
What steps will reproduce the problem?

$ cat k.c
#include <stdio.h>
int main(int argc, char* argv[]) {
printf("hello\n");
return 0;
}

$ cat k.go
package main
func main() {
println("hello")
}

$ rm -f *.o *.gc* k

$ /opt/gccgo/bin/gcc -o k k.c --coverage

k.gcno is created

$ ./k
hello

k.gcda is created

$ gcov k
File 'k.c'
Lines executed:100.00% of 3
Creating 'k.c.gcov'

looks good

now with go:

$ rm -f *.o *.gc* k

$ /opt/gccgo/bin/gccgo -o k k.go --coverage

k.gcno is created

$ ./k
hello

k.gcna is not created

Which compiler are you using (5g, 6g, 8g, gccgo)?

gccgo

Which operating system are you using?

linux

Which revision are you using? (hg identify)

tip

Issue 2:
Problem description on golang-nuts:
https://groups.google.com/d/msg/golang-nuts/mWXsJJMdL0M/wioVT04ye7UJ

In short, pprof misses 7.5% of samples in newstack/oldstack (perf reports them
properly). This happens because the profiler ignores samples on g0 (where
newstack/oldstack are executed). We need to figure out a way to attribute the samples to
the running goroutine.
Issue 1:
Playwright already offers the important assertion method toHaveClass but unfortunately it is not possible to use it, when explicitly checking for one class attribute.

The function offers several options for the expected argument, but is seems not possible to ensure that the class attribute contains one specific class attribute.

Using a regular expression is possible but relies on the exact order of class attributes and the delimiters used.

Maybe an property could be added the the options argument that allows to specify if the class string should be compared or rather a classList.contains operation (like in the native DOM) is wanted.

Checking for the existence of one specific class attribute in my experience is a very common tasks and should be made as simple as possible.

Issue 2:
Hi there)

I have a strange behavior with toHaveClass assertion.

I have an html

<label class="MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-outlined MuiFormLabel-root MuiFormLabel-colorPrimary Mui-error css-1958la6-MuiFormLabel-root-MuiInputLabel-root" data-shrink="false" for="mui-1" id="mui-1-label"></label>

And I have assertion:

await expect(label).toHaveClass('Mui-error')

which fails, but this one is good:

await expect(label).toHaveClass('MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-outlined MuiFormLabel-root MuiFormLabel-colorPrimary Mui-error css-1958la6-MuiFormLabel-root-MuiInputLabel-root')

Is that intended?

I expected toHaveClass be like: "Hey, label, do you have class Mui-error in your bag?", but instead I have "Hey, label, do you have exactly one class and is it Mui-error?".
Issue 1:
Checklist

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Description

https://docs.celeryproject.org/en/stable/userguide/extending.html#extending-commandoptions

The described code no longer works in celery 5+

Looking at celery's source code, 'user_options' are now expected to be a set(). In fact they are initialized to a defaultdict(set())

I believe that one should provide a click.option, but when i tried that things still fell apart as click is later accessing whatever is provided.opts

Suggestions

Upgrade the documentation to support click or modify the code to allow the above example to work

Issue 2:
Use case Scenario: Process Millions of files from S3

Approach:

List S3 Inventory (Task)

** Split small chunks (Task)

** Each chunk, read n(1000s) of files and process it (Long running Task)

My issue is with the int math of pre_fetch_count = concurrency * prefetch limit where I have to only one option, if my concurrency increases, so will my prefetch limit.

Is there a way to directly affect the number of Prefetch count after the math ? or is there a workaround ?

I want to use Gevent/Eventlet for fetching S3 objects but do not want to pre-fetch more than 1 task at the time.

Checklist

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Description

Suggestions
Issue 1:
Hello!

I keep getting errors like the one in the title. But today something strange happened - webview doesn't load the link I've provided.

I'm using react and my webview looks like this:

<webview
className={`profile-webview-${profile.id}`}
data-testid={`profile-webview-${profile.id}`}
src={link}
enableremotemodule
/>

Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

9.2.1

Operating System:

macOS 10.15.6

Last Known Working Electron version:

None

Expected Behavior

No error

Actual Behavior

Keep getting Error: Error invoking remote method 'ELECTRON_GUEST_VIEW_MANAGER_CALL': Error: (-3) loading 'https://twitter.com/kittypurrzog'

To Reproduce

Just navigate to the twitter frm

Screenshots

Additional Information

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

12.0.x, 13.0.1

What operating system are you using?

macOS

Operating System Version

macOS 11.2.3

What arch are you using?

x64

Last Known Working Electron version

11.4.3

Expected Behavior

execSync should take ~10ms

Actual Behavior

execSync takes around ~400ms

Repro: make a Fiddle with the following contents in main.js:

console.time('exec')
require('child_process').execSync('ls')
// electron 11.4.3: 11.764ms
// electron 12.0.4: 400.92ms
console.timeEnd('exec')

Electron v11.4.3 execFile: 78.952ms
Electron v12.0.4 execFile: 432.513ms

Electron v11.4.3 spawnSync: 7.173ms
Electron v12.0.4 spawnSync: 378.55ms

This could be a Node.js issue.

Testcase Gist URL

No response
Issue 1:
Environment

Windows build number: 10.0.18362.295
Windows Terminal version (if applicable): 0.3.2171.0

Any other software?

Steps to reproduce

Open remote SSH session to Linux (Ubuntu)

run nano

try to use CTRL+W to search for a string

Expected behavior

CTRL+W should put nano in search more

Actual behavior

The Linux tab closes immediately without even properly logging out of the SSH session.

Issue 2:
At Ignite, there's been some interest in a few specific scenarios on how to set up the terminal. @cinnamon-msft demo-ed that you can set the "commandline" setting to a .bat script. In my demo, I was able to set it to a powershell script.

It would be nice to have a blogpost or doc describing a few scenarios of how to do this and how this can be useful. Particularly, consider the following:

connect to a pre-saved SSH session

set up a dev/test environment with some pre-defined variables

These docs should be pretty easy to make. Just a matter of having something to share with the community so that they can wrap their heads around how Windows Terminal profiles can expand beyond "cmd", "powershell", and "wsl distros".

Feel free to add more ideas below or link resources that have done something like this :)
Issue 1:
See below for discussion

In [19]: import pandas as pd

In [20]: import numpy as np

In [21]: import random

In [22]: df = pd.DataFrame(np.random.random_sample((20,5)), index=[random.choice('ABCDE') for x in range(20)])

In [23]: df.loc[:,0].ix['A'].median()
Out[23]: 0.57704085832236685

In [24]: pd.version.version
Out[24]: '0.12.0'

In [1]: import pandas as pd

In [2]: import numpy as np

In [3]: import random

In [4]: df = pd.DataFrame(np.random.random_sample((20,5)), index=[random.choice('ABCDE') for x in range(20)])

In [5]: df.loc[:,0].ix['A'].median()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-57f9fc9d1583> in <module>()
----> 1 df.loc[:,0].ix['A'].median()

AttributeError: 'numpy.ndarray' object has no attribute 'median'

In [6]: pd.version.version
Out[6]: '0.13.0rc1-43-g4f9fefc'

Issue 2:
There is an issue with concat:

I expect it not to add rows from a second df in case there are such indexes in a first one.

But this doesn't work for me. After a lot of search I found that this is because I have duplicate values in indexes in both df.

It would be great to warn about such a behavior in standard function documentation.

That is how I found that it is not a bug, but rather a feature:

https://stackoverflow.com/questions/24089922/merge-multiple-dataframes-with-non-unique-indices/24091063#24091063

Frankly speaking, I would prefer if there was an option to leave only "unique" indexes and in case they are present in first df - skip them all together during the concat
Issue 1:
Your question

As we can see in the documentation

https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-element-state

We have WaitForSelector() has

1.'attached'

2.'detached'

3.'visible'

4.'hidden'

But while writing the script I can only view Visible and attached options only.

protected async invisiblity(ele) {
const element = await this.page.$(ele);
await element.waitForSelector(ele,{state:" "})
}

is there any way we can use detached of a selector.

Thank u .

Issue 2:
See here:

Not sure if its a TypeScript bug or if our types can be improved there. It's about prioritisation of the method type overloads afaik.
Issue 1:
The following provider does not actually work:

const fooToken = const OpaqueToken('fooToken');

Injector.resolveAndCreate([
new Provider(fooToken, useFactory: () => 'Bar')
]);

Instead, it only works if you change the signature to

new Provider(fooToken, useFactory: () => 'Bar', deps: const [])

Can the default be deps: const [] instead of failing?

Issue 2:
The following fails

const Binding(MyClass,toFactory: buildMyClass)

The following is successful

const Binding(MyClass,toFactory: buildMyClass, deps: const [])

What is a valid use case for

const Binding(MyClass,toFactory: buildMyClass, deps: null)?
Issue 1:
React version: 17.2

Steps To Reproduce

Using a class component, if a click event changes some state, which renders a new component, and the new component adds an event listener on its componentDidMount checking for clicks, the new component will trigger that event

Link to code example: https://codepen.io/tholman/pen/87c661f0c893a2f8727db927c48d6d12

(this does not happen if the created component uses hooks to add its event listener)

The current behavior

A state change via a click that causes a new component to be rendered, that new component can pick up the original click event that created it, which seems like its reaching back in time, to so speak.

The expected behavior

Perhaps this is now intended behavior with the react 17 event changes (although it doesn't happen if I add the event listener with a hook on a functional component, but I would expect that if a click event causes a render, and the listener is added on the componentDidMount function, I would assume the "click" is complete, and wouldn't be detected.

Issue 2:
React version:

Works in React v17.1.0

Doesn't work in React v18.0.0 & v18.1.0

Steps To Reproduce

Link to code example:

Broken React 18: https://codesandbox.io/s/nifty-bash-366bs4?file=/src/App.js

This version uses the latest react@next react-dom@next to verify that the latest (unreleased) version doesn't work either.

Working React 17: https://codesandbox.io/s/infallible-pine-n9vb4c?file=/src/App.js

The current behavior

If you open the React 18 CodeSandbox link from above, what you will notice when you hit the Open Dialog button is that you will receive an event like Got event in <Dialog />!

I tried to minimize the reproduction, the idea is that we have a Dialog component that receives an open prop, based on this prop we know to show the Dialog or not. However a Dialog should also have "outside click" behaviour, to fake this I setup a window.addEventListener('click') inside a useEffect to "capture" this behaviour. However when I click the Open Dialog button this is what happens:

Click Open Dialog

Set open state to true

Re-render component

Pass open={true} to the Dialog component

In a useEffect, setup the window.addEventListener('click') if the open value is true

The callback of the event listener receives the click event from step 1.

Console logs after clicking once on the Open Dialog button:

Open: false
*onClick*
Open: true
Got event in <Dialog />!

The expected behavior

If you open the React 17 CodeSandbox and repeat those steps from above, then you will see the expected behaviour where clicking on the Open Dialog does not trigger the log from within the window.addEventListener('click') it's only the second time that you click that button that it will log something because now the Dialog is considered in an open state.

Console logs after clicking once on the Open Dialog button:

Open: false
*onClick*
Open: true

Is this a bug, a regression or am I doing something incorrect here? I'm confused how a window.addEventListener can receive an event from a click that happened before the listener was even setup 🤔