httpx.LocalProtocolError: Illegal header value b'Bearer '

I have no idea, I am just going to put it here ;p
I have executed pip install -r requirements.txt and pip install -r faster_whisper_requirements.txt [because I want everything to run locally].
Playing sound FX: sounds/recording-start
use_clipboard: False
Stopping recording...
Playing sound FX: sounds/recording-end
Recording saved to audio_files\temp_recording.wav
An error occurred during the transcription process: Connection error.
Traceback (most recent call last):
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 69, in map_httpcore_exceptions
yield
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 233, in handle_request
resp = self._pool.handle_request(req)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection_pool.py", line 216, in handle_request
raise exc from None
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection_pool.py", line 196, in handle_request
response = connection.handle_request(
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection.py", line 101, in handle_request
return self._connection.handle_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 143, in handle_request
raise exc
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 93, in handle_request
self._send_request_headers(**kwargs)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 151, in _send_request_headers
with map_exceptions({h11.LocalProtocolError: LocalProtocolError}):
File "C:\Users\Username\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.LocalProtocolError: Illegal header value b'Bearer '
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 952, in _request
response = self._client.send(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 914, in send
response = self._send_handling_auth(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 942, in _send_handling_auth
response = self._send_handling_redirects(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 979, in _send_handling_redirects
response = self._send_single_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 1015, in _send_single_request
response = transport.handle_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 232, in handle_request
with map_httpcore_exceptions():
File "C:\Users\Username\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 86, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.LocalProtocolError: Illegal header value b'Bearer '
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AlwaysReddy\transcriber.py", line 42, in transcribe_audio
transcript = self.client.transcribe_audio_file(full_path)
File "C:\AlwaysReddy\transcription_apis\openai_api.py", line 24, in transcribe_audio_file
transcript = self.client.audio.transcriptions.create(
File "C:\AlwaysReddy\venv\lib\site-packages\openai\resources\audio\transcriptions.py", line 116, in create
return self._post(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1240, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 921, in request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 976, in _request
return self._retry_request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1053, in _retry_request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 976, in _request
return self._retry_request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1053, in _retry_request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 986, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AlwaysReddy\main.py", line 87, in stop_recording
transcript = self.transcription_manager.transcribe_audio(self.recorder.filename)
File "C:\AlwaysReddy\transcriber.py", line 57, in transcribe_audio
raise Exception(f"An error occurred during the transcription process: {e}") from e
Exception: An error occurred during the transcription process: Connection error.

Hmmm looks like there was an internet connection issue during transcription, but transcription should be happening locally.
Make sure your config file is correctly setup, the transcription section should look something like this:

### Transcription API Settings ###

## Faster Whisper local transcription ###
TRANSCRIPTION_API = "FasterWhisper" # this will use the local whisper model
WHISPER_MODEL = "tiny.en" # If you prefer not to use english set it to "tiny", if the transcription quality is too low then set it to "base" but this will be a little slower
BEAM_SIZE = 5

## OPENAI Hosted Transcription ###
# TRANSCRIPTION_API = "openai" # this will use the hosted openai api

Let me know what you find!

Also double check you have set your API key in the .env file if you are wanting to use the openai API

Thanks for your feedback, I will try again, the API key is "" cause using Ollama.

I have retested: 16 May 2024:
Press 'alt+ctrl+r' to start recording, press again to stop and transcribe.
Double tap to the record hotkey to give AlwaysReddy the content currently copied in your clipboard.
Press 'alt+ctrl+e' to cancel recording.
Press 'alt+ctrl+w' to clear the chat history.
use_clipboard: False
Starting recording...
Recording started...
Playing sound FX: sounds/recording-start
use_clipboard: False
Stopping recording...
Playing sound FX: sounds/recording-end
Recording saved to audio_files\temp_recording.wav
An error occurred during the transcription process: Connection error.
Traceback (most recent call last):
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 69, in map_httpcore_exceptions
yield
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 233, in handle_request
resp = self._pool.handle_request(req)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection_pool.py", line 216, in handle_request
raise exc from None
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection_pool.py", line 196, in handle_request
response = connection.handle_request(
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection.py", line 101, in handle_request
return self._connection.handle_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 143, in handle_request
raise exc
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 93, in handle_request
self._send_request_headers(**kwargs)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 151, in _send_request_headers
with map_exceptions({h11.LocalProtocolError: LocalProtocolError}):
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.LocalProtocolError: Illegal header value b'Bearer '
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 952, in _request
response = self._client.send(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 914, in send
response = self._send_handling_auth(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 942, in _send_handling_auth
response = self._send_handling_redirects(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 979, in _send_handling_redirects
response = self._send_single_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 1015, in _send_single_request
response = transport.handle_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 232, in handle_request
with map_httpcore_exceptions():
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 86, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.LocalProtocolError: Illegal header value b'Bearer '
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AlwaysReddy\transcriber.py", line 42, in transcribe_audio
transcript = self.client.transcribe_audio_file(full_path)
File "C:\AlwaysReddy\transcription_apis\openai_api.py", line 24, in transcribe_audio_file
transcript = self.client.audio.transcriptions.create(
File "C:\AlwaysReddy\venv\lib\site-packages\openai\resources\audio\transcriptions.py", line 116, in create
return self._post(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1240, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 921, in request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 976, in _request
return self._retry_request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1053, in _retry_request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 976, in _request
return self._retry_request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1053, in _retry_request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 986, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AlwaysReddy\main.py", line 87, in stop_recording
transcript = self.transcription_manager.transcribe_audio(self.recorder.filename)
File "C:\AlwaysReddy\transcriber.py", line 57, in transcribe_audio
raise Exception(f"An error occurred during the transcription process: {e}") from e
Exception: An error occurred during the transcription process: Connection error.

This is the entire config:
MAKE A COPY OF THIS CALLED config.py
VERBOSE = True
USE_GPU = False  # Set to True to use GPU acceleration. Refer to the README for instructions on installing PyTorch with CUDA support.
COMPLETIONS API SETTINGS
Just uncomment the ONE api you want to use
LOCAL OPTIONS
OLLAMA COMPLETIONS API EXAMPLE
COMPLETIONS_API = "ollama"
COMPLETION_MODEL = "llava-llama3" #"llama3"
OLLAMA_API_BASE_URL = "http://localhost:11434" #This should be the default
LM Studio COMPLETIONS API EXAMPLE
COMPLETIONS_API = "lm_studio"
COMPLETION_MODEL = "local-model" # You dont need to update this
LM_STUDIO_API_BASE_URL = "http://localhost:1234/v1" #This should be the defualt
Hosted APIS
ANTHROPIC COMPLETIONS API EXAMPLE
COMPLETIONS_API = "anthropic"
COMPLETION_MODEL = "claude-3-sonnet-20240229"
TOGETHER COMPLETIONS API EXAMPLE
COMPLETIONS_API = "together"
COMPLETION_MODEL = "meta-llama/Llama-3-8b-chat-hf"
OPENAI COMPLETIONS API EXAMPLE
COMPLETIONS_API = "openai"
COMPLETION_MODEL = "gpt-4-0125-preview"
PERPLEXITY COMPLETIONS API EXAMPLE
COMPLETIONS_API = "perplexity"
COMPLETION_MODEL = "llama-3-sonar-small-32k-online"
OPENROUTER COMPLETIONS API EXAMPLE
COMPLETIONS_API = "openrouter"
COMPLETION_MODEL = "openai/gpt-3.5-turbo"
Transcription API Settings
Faster Whisper local transcription
TRANSCRIPTION_API = "FasterWhisper" # this will use the local whisper model
WHISPER_MODEL = "tiny.en" # If you prefer not to use english set it to "tiny", if the transcription quality is too low then set it to "base" but this will be a little slower
BEAM_SIZE = 5
OPENAI Hosted Transcription
TRANSCRIPTION_API = "openai" # this will use the hosted openai api
TTS SETTINGS
TTS_ENGINE="openai" # 'piper' or 'openai' piper is local and fast but openai is better sounding
PIPER_VOICE = "default_female_voice"
OPENAI_VOICE = "nova"
PROMPTS
ACTIVE_PROMPT = "default_prompt" #Right now there is only 1 prompt
HOTKEYS
CANCEL_HOTKEY = 'alt+ctrl+e'
CLEAR_HISTORY_HOTKEY = 'alt+ctrl+w'
RECORD_HOTKEY = 'alt+ctrl+r'
MISC
HOTKEY_DELAY = 0.5
AUDIO_FILE_DIR = "audio_files"
MAX_TOKENS = 8000 #Max tokens allowed in memory at once
START_SEQ = "-CLIPSTART-" #the model is instructed to place any text for the clipboard between the start and end seq
END_SEQ = "-CLIPEND-" #the model is instructed to place any text for the clipboard between the start and end seq
AUDIO SETTINGS
BASE_VOLUME = 1
FS = 11025
START_SOUND_VOLUME = 0.05
END_SOUND_VOLUME = 0.05
CANCEL_SOUND_VOLUME = 0.09
MIN_RECORDING_DURATION = 0.3
MAX_RECORDING_DURATION= 600 # If you record for more than 10 minutes, the recording will stop automatically

This is the env:
TOGETHER_API_KEY=""
OPENAI_API_KEY=""
ANTHROPIC_API_KEY="sk-.."
PERPLEXITY_API_KEY="pplx-.."
OPENROUTER_API_KEY="sk-or..."

I see the issue, in your config you have uncommented the ollama and fasterwhisper sections correctly, but you need to comment out the openai sections, the openai completions and transcriptions  APIs are still declared after ollama and faster whisper meaning it uses the apis instead. Update your config.py to this:
This is the entire config:

## MAKE A COPY OF THIS CALLED config.py
VERBOSE = True
USE_GPU = False  # Set to True to use GPU acceleration. Refer to the README for instructions on installing PyTorch with CUDA support.

### COMPLETIONS API SETTINGS  ###
# Just uncomment the ONE api you want to use

### LOCAL OPTIONS ###

## OLLAMA COMPLETIONS API EXAMPLE ##
COMPLETIONS_API = "ollama"
COMPLETION_MODEL = "llava-llama3" #"llama3"
OLLAMA_API_BASE_URL = "http://localhost:11434" #This should be the default

## LM Studio COMPLETIONS API EXAMPLE ##
# COMPLETIONS_API = "lm_studio"
# COMPLETION_MODEL = "local-model" # You dont need to update this
# LM_STUDIO_API_BASE_URL = "http://localhost:1234/v1" #This should be the defualt

### Hosted APIS ###

## ANTHROPIC COMPLETIONS API EXAMPLE ##
# COMPLETIONS_API = "anthropic"
# COMPLETION_MODEL = "claude-3-sonnet-20240229"

## TOGETHER COMPLETIONS API EXAMPLE ##
# COMPLETIONS_API = "together"
# COMPLETION_MODEL = "meta-llama/Llama-3-8b-chat-hf"

## OPENAI COMPLETIONS API EXAMPLE ##
# COMPLETIONS_API = "openai"
# COMPLETION_MODEL = "gpt-4-0125-preview"

## PERPLEXITY COMPLETIONS API EXAMPLE ##
# COMPLETIONS_API = "perplexity"
# COMPLETION_MODEL = "llama-3-sonar-small-32k-online"

## OPENROUTER COMPLETIONS API EXAMPLE ##
# COMPLETIONS_API = "openrouter"
# COMPLETION_MODEL = "openai/gpt-3.5-turbo"

### Transcription API Settings ###

## Faster Whisper local transcription ###
TRANSCRIPTION_API = "FasterWhisper" # this will use the local whisper model
WHISPER_MODEL = "tiny.en" # If you prefer not to use english set it to "tiny", if the transcription quality is too low then set it to "base" but this will be a little slower
BEAM_SIZE = 5

## OPENAI Hosted Transcription ###
# TRANSCRIPTION_API = "openai" # this will use the hosted openai api

### TTS SETTINGS ###
TTS_ENGINE="openai" # 'piper' or 'openai' piper is local and fast but openai is better sounding

PIPER_VOICE = "default_female_voice"
OPENAI_VOICE = "nova"

### PROMPTS ###
ACTIVE_PROMPT = "default_prompt" #Right now there is only 1 prompt

### HOTKEYS ###
CANCEL_HOTKEY = 'alt+ctrl+e'
CLEAR_HISTORY_HOTKEY = 'alt+ctrl+w'
RECORD_HOTKEY = 'alt+ctrl+r'

### MISC ###
HOTKEY_DELAY = 0.5
AUDIO_FILE_DIR = "audio_files"
MAX_TOKENS = 8000 #Max tokens allowed in memory at once
START_SEQ = "-CLIPSTART-" #the model is instructed to place any text for the clipboard between the start and end seq
END_SEQ = "-CLIPEND-" #the model is instructed to place any text for the clipboard between the start and end seq

### AUDIO SETTINGS ###
BASE_VOLUME = 1
FS = 11025
START_SOUND_VOLUME = 0.05
END_SOUND_VOLUME = 0.05
CANCEL_SOUND_VOLUME = 0.09
MIN_RECORDING_DURATION = 0.3
MAX_RECORDING_DURATION= 600 # If you record for more than 10 minutes, the recording will stop automatically

I added a # before TRANSCRIPTION_API = "openai" # this will use the hosted openai api to comment this out, and same for the openai completions section
## OPENAI COMPLETIONS API EXAMPLE ##
COMPLETIONS_API = "openai"
COMPLETION_MODEL = "gpt-4-0125-preview"

->
## OPENAI COMPLETIONS API EXAMPLE ##
# COMPLETIONS_API = "openai"
# COMPLETION_MODEL = "gpt-4-0125-preview"

This should resolve the issue, let me know if it dosent and reopen the issue :)
Sorry the whole config system is kind of confusing, id like to find something better

Hi, after directly using your config file, it recognized my voice and it "text responded", but it didn't talk, here is the output:
Please note that I am using the config file you gave me directly.
Using faster-whisper model: tiny.en and device: cpu
Press 'alt+ctrl+r' to start recording, press again to stop and transcribe.
Double tap to the record hotkey to give AlwaysReddy the content currently copied in your clipboard.
Press 'alt+ctrl+e' to cancel recording.
Press 'alt+ctrl+w' to clear the chat history.
use_clipboard: False
Starting recording...
Recording started...
Playing sound FX: sounds/recording-start
use_clipboard: False
Stopping recording...
Playing sound FX: sounds/recording-end
Recording saved to audio_files\temp_recording.wav
Transcribing audio file: audio_files\temp_recording.wav
Detected language: en with probability 1.00
Transcription:
Hello computer.
Traceback (most recent call last):
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 69, in map_httpcore_exceptions
yield
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 233, in handle_request
resp = self._pool.handle_request(req)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection_pool.py", line 216, in handle_request
raise exc from None
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection_pool.py", line 196, in handle_request
response = connection.handle_request(
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection.py", line 101, in handle_request
return self._connection.handle_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 143, in handle_request
raise exc
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 93, in handle_request
self._send_request_headers(**kwargs)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 151, in _send_request_headers
with map_exceptions({h11.LocalProtocolError: LocalProtocolError}):
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.LocalProtocolError: Illegal header value b'Bearer '
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 952, in _request
response = self._client.send(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 914, in send
response = self._send_handling_auth(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 942, in _send_handling_auth
response = self._send_handling_redirects(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 979, in _send_handling_redirects
response = self._send_single_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 1015, in _send_single_request
response = transport.handle_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 232, in handle_request
with map_httpcore_exceptions():
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 86, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.LocalProtocolError: Illegal header value b'Bearer '
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AlwaysReddy\TTS_apis\openai_api.py", line 33, in tts
spoken_response = self.client.audio.speech.create(
File "C:\AlwaysReddy\venv\lib\site-packages\openai\resources\audio\speech.py", line 86, in create
return self._post(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1240, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 921, in request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 976, in _request
return self._retry_request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1053, in _retry_request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 976, in _request
return self._retry_request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1053, in _retry_request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 986, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
Traceback (most recent call last):
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 69, in map_httpcore_exceptions
yield
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 233, in handle_request
resp = self._pool.handle_request(req)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection_pool.py", line 216, in handle_request
raise exc from None
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection_pool.py", line 196, in handle_request
response = connection.handle_request(
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\connection.py", line 101, in handle_request
return self._connection.handle_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 143, in handle_request
raise exc
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 93, in handle_request
self._send_request_headers(**kwargs)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_sync\http11.py", line 151, in _send_request_headers
with map_exceptions({h11.LocalProtocolError: LocalProtocolError}):
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\AlwaysReddy\venv\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.LocalProtocolError: Illegal header value b'Bearer '
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 952, in _request
response = self._client.send(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 914, in send
response = self._send_handling_auth(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 942, in _send_handling_auth
response = self._send_handling_redirects(
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 979, in _send_handling_redirects
response = self._send_single_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_client.py", line 1015, in _send_single_request
response = transport.handle_request(request)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 232, in handle_request
with map_httpcore_exceptions():
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "C:\AlwaysReddy\venv\lib\site-packages\httpx_transports\default.py", line 86, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.LocalProtocolError: Illegal header value b'Bearer '
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AlwaysReddy\TTS_apis\openai_api.py", line 33, in tts
spoken_response = self.client.audio.speech.create(
File "C:\AlwaysReddy\venv\lib\site-packages\openai\resources\audio\speech.py", line 86, in create
return self._post(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1240, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 921, in request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 976, in _request
return self._retry_request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1053, in _retry_request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 976, in _request
return self._retry_request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 1053, in _retry_request
return self._request(
File "C:\AlwaysReddy\venv\lib\site-packages\openai_base_client.py", line 986, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
Completion successful. Full response: Hello! How can I assist you today?
Response:
Hello! How can I assist you today?


CI: Builds samples, fix halgal capture sample

Implement CI workflow for samples
Fix halgal capture sample

NOTE: It does not pass as-is but should serve as a good base to fixup all the samples

Nice!


V0.1.5 dev

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c198763) 100.00% compared to head (4869584) 100.00%.
Report is 1 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff            @@
##            master       #15   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           12        12
  Lines          453       453
=========================================
  Hits           453       453

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


[badges] Allow submitting form with [70-130%] coefficient

Increase the coefficient range to [70-130%] (currently coefficient_x10000 must be between 9000 and 11000)

@dappdever you need to update the smartcontract too I think


nested datasource property in repeaters

consider the following template:

    {{data.name}}

{{data.effects.length}}

{{effect.name}}

the data.effects.length prints correctly the number of elements, but the nested repeater does not see the data 😢

The bindings takes effect on data property, not the effects nested property.
If you re-set the data, does this work?

Can you please elaborate what do you mean by "re-set the data"? I don't set it anywhere, it's all templates magic

resetting the data, even if unchanged
this.data = this.data or this.commit('data');
The first one invokes the setter function, which automatically invokes the commit.


Change name of setState updater first arg to 'state'

Followup from tweet about setState updater docs, with support from @gaearon:

Possible confusion in React docs for setState updater pattern - calling first arg prevState seems odd because it could actually be a future value of state relative to this.state. Should it just be called state and align with getDerivedStateFromProps args?

https://twitter.com/mikemcgahan/status/1037074327269568512
The reference to 'previous state' is ambiguous in the 'updater' context, so this PR changes the suggested prevState arg name to state. This change helps conceptually align the 'updater' function with the behavior of getDerivedStateFromProps - both are pure functions that take a 'current' state arg and return partialState updates.

It's glad to know I'm not alone :)
Actually I found the code on Try It On CodePen still uses prevState, which causes me a bit confused: according to the context, shouldn't it be state?
And I found if I change prevState to prevMyState, the code still works.
this.setState(prevMyState => ({
      showWarning: !prevMyState.showWarning
    }));

@karlli1976 yeah, you can technically name it whatever you want - it won't break the code, but it may mislead people who read prevState as referring to some sort of cached or 'past' state. I can't update the CodePen code, but it's probably not critical


Textarea to bbcode (with new lines)

Hey! Great library!
I am a long time BBCode fan, and wanting to do some livestreams integrating bbob into a project I'm working on.
One question is regarding the best practices on storing the BBcode data.
Is it preferred to store the AST, or plain text?
If the AST is required to be saved to the DB, what is the best function/helper to use here? One other thing would be storing, and parsing new lines. What is your recommend here?
I'm using React. I'm happy to contribute to docs once I know the answer to make it easier for others.

Hi :) I prefer store plain text, cuz it's more safe, you can change your bb code parsing infrastructure easily.
What about new lines, you can create plugin to handle this (if u need specific behavior) for ex https://codesandbox.io/s/youthful-bose-2kjsq?file=/src/index.js

Hi @JiLiZART
Thanks for responding so quickly. I was also in favour of storing plain text.
I tried viewing the CSB but the link just shows a CRA boilerplate.

F8k, i forgot to save :(


[Request for External] report 6697 "Create Ret.-Related Documents" - Protected variables

Hello, we need the following currently global variable/-s to be set as protected. Can you please check this? Thank you!
protected var
   SROSalesHeader: Record "Sales Header";

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 41029.


Improve GroupBy query execution to push limit to segment scan phase

Motivation
GroupBy query execution has ways to push down limits to queryable nodes for merging which exploits the small limit to cut down on the data transfer and processing.
however, currently the limit pushdown is only done till the merge phase at historical while segment scan phase does not exploit the limit pushdown which slows down a groupBy query if there were too many unique grouped rows in the segments with many complex aggregators.
so, this proposal is to optionally enable pushing down limit all the way down to segment scan during the GroupBy query processing.
Proposed changes
I have tried a prototype, on 0.15.0 build which is currently running in my Druid cluster, following changes (combined with #8412 ) show tremendous improvements for some of the groupBy queries on large dataset with complex aggregators and aggressive limit.

GroupByQueryEngineV2.HashAggregateIterator.newGrouper() is updated to return LimitedBufferHashGrouper when query.isApplyLimitPushDown() == true
GroupByQueryEngineV2.GroupByEngineKeySerde is updated to correctly implement Grouper.BufferComparator bufferComparator() and Grouper.BufferComparator bufferComparatorWithAggregators(..) methods.
A new method Grouper.BufferComparator bufferComparator(int keyBufferPosition, @Nullable StringComparator stringComparator) is added to GroupByColumnSelectorStrategy

Also, to be safe, I am planning to add a query context flag enableLimitPushdownToSegment to enable this optimization .
Test plan (optional)
There are existing tests with queries the push down limits, will update them to also run with enableLimitPushdownToSegment=true

Fixed by #8426


test with batch

@liuheng92  Hi, thanks for your work.
I want to test hundreds of images, but with batch, not a single image.
is it possible? what should I do?

I think it will work，but you should modify pse pro-processing function


Updated packages

Used commands 'npm update' and 'npm audit fix' to patch security issues.

@AndrewWladis looks good, thanks!


webpack 5.0.0-beta.30 Module not found: Error: Can't resolve '../../core-js/object/define-property'

Bug report

What is the current behavior?
install @babel/runtime-corejs3
for file index.js
import '@babel/runtime-corejs3/helpers/esm/defineProperty'

and run webpack ./index.js
ERROR in<EMAIL_ADDRESS>1:0-74
Module not found: Error: Can't resolve '../../core-js/object/define-property' in 'xxx\node_modules\@babel\runtime-corejs3\helpers\esm'
 @ ./index.js 1:0-58

beta.29 is working properly on this.
but if we manually edit line 1 in file<EMAIL_ADDRESS>from
import _Object$defineProperty from "../../core-js/object/define-property";

to
import _Object$defineProperty from "../../core-js/object/define-property.js";

and this issue goes away.
If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Other relevant information:
webpack version:  5.0.0-beta.30
Node.js version: 12.16.1
Operating System: win10 2004
Additional tools:
at the time I'm using<EMAIL_ADDRESS>

I'm having a very similar issue after upgrading from beta.29 to beta.30, but with this file:
ERROR in ./node_modules/graphql/language/parser.mjs 1:0-41
Module not found: Error: Can't resolve '../jsutils/inspect' in '/Users/evhaus/Git/zenhub/client/node_modules/graphql/language'
 @ ./node_modules/graphql-tag/src/index.js 1:13-47
 @ ./shared/services/GitHubGraphQL/fetchIssueDataAsREST.js 23:0-30 24:12-15
 @ ./shared/services/GitHubGraphQLAPI.js 25:0-79 130:9-29
 @ ./shared/services/Issue.js 6:0-59 67:9-37 73:9-41
 @ ./shared/store/actions/types/boardActions.js 25:0-47 194:77-102 197:75-93 202:81-102 251:89-118 252:86-115
 @ ./shared/store/ducks/workspaceForm.js 70:0-83 1115:17-30 1974:15-31
 @ ./webapp/src/pages/RedirectToWorkspaceOrCreate.jsx 34:0-76 230:15-56
 @ ./webapp/src/Root.tsx 39:0-78 227:15-42
 @ ./webapp/src/index.jsx 23:0-26 68:7-11

I'm guessing the cache isn't being reset properly? What's the right way to clear it?

I'm having a very similar problem after upgrading from beta.29 to beta.30 but with this different import:
ERROR in ./node_modules/graphql/language/parser.mjs 1:0-41
Module not found: Error: Can't resolve '../jsutils/inspect' in '/Users/my_project/node_modules/graphql/language'
 @ ./node_modules/graphql-tag/src/index.js 1:13-47
 @ ./webapp/src/index.jsx 23:0-26 68:7-11

Clearing the local filesystem cache (rm -rf node_modules/.cache) didn't help. But rolling back to beta.29 worked for me as well.

I also encountered the same problem, which seems to be caused by enabling mjs experiments, and I did not find a way to close mjs experiments.

These are all the same issues. In .mjs files or .js files with a package.json with "type": "module" imports need to be fully specified. This means you need to have an extension.
That how ESM in node.js is defined, and you are opting in into this behavior by using the .mjs extension resp the field in the package.json.
We didn't enforce this behavior in previous versions while this was still experimental in node.js, but it left this status, so I feel ok with enforcing this and pointing out these incorrect packages.
You could disable that with { test: /\.m?js/, type: "javascript/auto" } in module.rules.

@sokra I have extremely similar symptoms, even with the above module.rules suggestion. Rolling back to beta.29 compiles successfully
ERROR in<EMAIL_ADDRESS>3:0-70
Module not found: Error: Can't resolve './unsupportedIterableToArray' in 'C:\s\node_modules\@babel\runtime\helpers\esm'

I tried various positions of adding the rule, setting type in other potential rules involving .js/typescript that might affect it, but none solved this module not found issue.
I suspect babel need to fix their code to support this correctly, otherwise there will be many people having issues with this on webpack5.
For now I am sticking to beta.29.

After configuring like this, there will still be some modules Can't resolve.
const path = require('path');

module.exports = {
  mode: 'development',
  entry: { index: path.join(__dirname, 'src/index.js') },
  devtool: 'source-map',
  module: {
    rules: [
      { test: /\.m?js/, type: "javascript/auto" },
      {
        test: /.*\.js$/,
        type: 'javascript/auto',
        exclude: /node_modules/,
        use: [
          {
            loader: 'babel-loader',
            options: {
              presets: [
                [
                  '@babel/preset-env',
                  {
                    targets: {
                      browsers: ['IE 11']
                    },
                    debug: false,
                    modules: false,
                    useBuiltIns: 'usage',
                    bugfixes: true,
                    corejs: 3
                  }
                ]
              ],
              plugins: [
                [
                  '@babel/plugin-transform-runtime',
                  {
                    corejs: { version: 3, proposals: true },
                    helpers: true,
                    regenerator: true,
                    useESModules: true
                  }
                ]
              ]
            }
          }
        ]
      }
    ]
  }
};

import _asyncToGenerator from<EMAIL_ADDRESS>
function main() {
  console.log(_asyncToGenerator);
}

main();

btw this is not an webpack-only error. If you run<EMAIL_ADDRESS>in node.js you get an error too:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '...\node_modules\@babel\runtime-corejs3\core-js\object\define-property' imported from<EMAIL_ADDRESS>

You could disable that with { test: /\.m?js/, type: "javascript/auto" } in module.rules.

Ok I tried that by myself and it doesn't work correctly. Instead you have to do that to change the resolving for these modules:
{
  test: /\.m?js/,
  resolve: {
    fullySpecified: false
  }
}

type: "javascript/auto" might be added to fully disable the different behavior for .mjs files, but that doesn't affect the resolving. It only affects e. g. how interop with non-ESM modules is handled.

@sokra maybe we can put this option to https://webpack.js.org/configuration/resolve/ (by default true), I'm afraid of too many projects use wrong paths in import, using:
{
  test: /\.m?js/,
  resolve: {
    fullySpecified: false
  }
}

with babel/ts/other loaders will increase the size an complex of configurations

Also I think we need docs this
/cc @chenxsan

@evilebottnawi

@sokra maybe we can put this option to https://webpack.js.org/configuration/resolve/ (by default true), I'm afraid of too many projects use wrong paths in import, using:

thats how Node.js resolves.. Maybe we need to point in docs workaround..

@vankop yes, I known, in theory we can improve error messages out of box, like:
ERROR in<EMAIL_ADDRESS>1:0-74
Module not found: Error: Can't resolve '../../core-js/object/define-property' in 'xxx\node_modules\@babel\runtime-corejs3\helpers\esm'
 @ ./index.js 1:0-58

You're using ES module syntax, maybe you meant:
import<EMAIL_ADDRESS>or
import<EMAIL_ADDRESS>
Because now you might think something wrong with resolving

I also encounter similar issue but the message is like:
error  in<EMAIL_ADDRESS>
Module not found: Error: Can't resolve './iterableToArray' in '/xxx/node_modules/@babel/runtime/helpers/esm'

To what I know this is an error when @babel/runtime is importing its internal module (both inside helpers/esm folder), es module resolution of node should not forbid internal imports, it only affects how other modules import it from external.

It's not forbidden. The import request need to be fully specified as './iterableToArray.js'.

Happening to me as well. Upgrading Webpack from beta.29 to beta.30, not doing literally anything else, breaks the build:
ModuleNotFoundError: Module not found: Error: Can't resolve './assertThisInitialized' in '/node_modules/@babel/runtime/helpers/esm'
    at /node_modules/webpack/lib/Compilation.js:1470:28
    at /node_modules/webpack/lib/NormalModuleFactory.js:647:13
    at eval (eval at create (/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
    at /node_modules/webpack/lib/NormalModuleFactory.js:233:22
    at eval (eval at create (/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at /node_modules/webpack/lib/NormalModuleFactory.js:357:22
    at /node_modules/webpack/lib/NormalModuleFactory.js:116:11
    at /node_modules/webpack/lib/NormalModuleFactory.js:576:24
    at finishWithoutResolve (/node_modules/enhanced-resolve/lib/Resolver.js:284:11)
    at /node_modules/enhanced-resolve/lib/Resolver.js:350:15
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at /node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:87:43
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at /node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:87:43
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /node_modules/enhanced-resolve/lib/ConditionalPlugin.js:39:48
    at _next0 (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:8:1)
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:57:1)
    at /node_modules/enhanced-resolve/lib/ConditionalPlugin.js:52:42
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve './assertThisInitialized' in '/node_modules/@babel/runtime/helpers/esm'
  using description file<EMAIL_ADDRESS>(relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    using description file<EMAIL_ADDRESS>(relative path: ./assertThisInitialized)
      Field 'browser' doesn't contain a valid alias configuration
      /node_modules/@babel/runtime/helpers/esm/assertThisInitialized doesn't exist

Also seeing this issue with beta 30->32 as well, 29 still works ok. All of the errors we're getting are coming from Material UI via @babel/runtime.

There is no problems on webpack side

I'm not having luck with the fullySpecified solution. When I add that to my module rules and try the latest rc.0 build I end up with this failure:
/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:362
			newStack = new Set(resolveContext.stack);
			           ^

RangeError: Maximum call stack size exceeded
    at new Set (<anonymous>)
    at Resolver.doResolve (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:362:15)
    at resolver.getHook.tapAsync (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/ConditionalPlugin.js:42:14)
    at Hook.eval [as callAsync] (eval at create (/myproject/client/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:37:1)
    at Resolver.doResolve (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:394:16)
    at resolver.getHook.tapAsync (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/NextPlugin.js:30:14)
    at Hook.eval [as callAsync] (eval at create (/myproject/client/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
    at Resolver.doResolve (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:394:16)
    at DescriptionFileUtils.loadDescriptionFile (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:74:17)
    at forEachBail (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:118:13)

And sometimes this one:
/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:42
	(function findDescriptionFile() {
	                             ^

RangeError: Maximum call stack size exceeded
    at findDescriptionFile (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:42:31)
    at forEachBail (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:125:14)
    at iterator (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/forEachBail.js:16:12)
    at resolver.fileSystem.readJson (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:58:16)
    at CacheBackend.provide (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:174:31)
    at forEachBail (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:52:26)
    at next (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/forEachBail.js:14:3)
    at forEachBail (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/forEachBail.js:24:9)
    at findDescriptionFile (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:47:3)
    at forEachBail (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:125:14)

The same issues don't happen on beta.29. Is anyone else seeing similar problems?

@EvHaus Can you create reproducible test repo?

/cc @vankop

Logged as a new issue with reproducible test repo here: https://github.com/webpack/webpack/issues/11518 I think it's unrelated to this issue actually.

I'm having the similar problem:
webpack version: 5.0.0-rc.0
node version:14.11.0
.babelrc.js
"plugins": [
    [
      "@babel/plugin-transform-runtime",
      {
        "absoluteRuntime": false,
        "corejs": 3,
        "helpers": true,
        "regenerator": true,
        "useESModules": true
      }
    ],
  ]

ERROR in<EMAIL_ADDRESS>1:0-51
Module not found: Error: Can't resolve '../../core-js/symbol/for' in 'E:\project\antdFront2\node_modules\@babel\runtime-corejs3\helpers\esm'
Did you mean 'for.js'?
BREAKING CHANGE: The request '../../core-js/symbol/for' failed to resolve only because it was resolved as fully specified
(probably because the origin is a '*.mjs' file or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

I have the same issue as @wojtekmaj. { fullySpecified: false } doesn't work for me.

I've been investigating and trying workarounds. However the error still exists with stable v5.0.0. { fullySpecified: false } or another workarounds which are proposed in related issue does not work well now.

@SokichiFujita it means you have other broken packages please provide screenshots or the error message

@evilebottnawi Thanks. Does it mean webpack 5 has no problem but material-ui or babel (plugins) has problem?

Error messages:
ERROR in<EMAIL_ADDRESS>1:0-74
Module not found: Error: Can't resolve './objectWithoutPropertiesLoose' in '/Users/s/mydev/react/starter-react-flux/__test/node_modules/@babel/runtime/helpers/esm'
Did you mean 'objectWithoutPropertiesLoose.js'?
BREAKING CHANGE: The request './objectWithoutPropertiesLoose' failed to resolve only because it was resolved as fully specified
(probably because the origin is a '*.mjs' file or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
<EMAIL_ADDRESS>1:0-90 57:16-40
<EMAIL_ADDRESS>9:0-30 9:0-30
 @ ./app/App.js 4:0-76 7:15-29 18:41-57
 :

same messages

Yes, it is bug on Babel side, they will do release on the next week

@evilebottnawi I got it. Maybe this issue https://github.com/babel/babel/issues/12058 . The next babel 7.12 may solve these  issue.

@sokra maybe we can put this option to https://webpack.js.org/configuration/resolve/ (by default true), I'm afraid of too many projects use wrong paths in import, using:
{
  test: /\.m?js/,
  resolve: {
    fullySpecified: false
  }
}

with babel/ts/other loaders will increase the size an complex of configurations

This worked for me - but I needed to add a dollar sign to the end of the regular expression (/\.m?js$/) or webpack 5 started failing on JSON files (it matched .json as well as .mjs and .js).

@sokra it might be worth pinning this issue. I’m getting a lot of traffic around mjs resolution, everyone needs the same thing

@ScriptedAlchemy Already pinned https://github.com/webpack/webpack :smile:

This problem was resolved by using this role but only after upgrading to webpack 5.1.0
{
  test: /\.m?js/,
  resolve: {
    fullySpecified: false
  }
}

@SokichiFujita You may have added fullySpecified in the wrong place, I made this error, it is not the general resolve but that of a rule:
    module: {
      rules: [
        {
          test: /\.(js|mjs|jsx)$/,
          enforce: 'pre',
          loader: require.resolve('source-map-loader'),
          resolve: {
            fullySpecified: false
          }
        },
        // ...
      ]
    }

similar configuration still not working

You need extensions as well most likely. Or to include node modules

I really just used this role in 5.1.0 and it worked
{
  test: /\.m?js$/,
  resolve: {
    fullySpecified: false
  }
}

similar configuration still not working with webpack 5.1.0
{
test: /\.(mj|j|t)sx?$/,
resolve: {
    fullySpecified: false
  },
  type: "javascript/auto",
  exclude: /node_modules/,
  use: {
    loader: "babel-loader",
    options: {
      cwd: BABEL_PATH,
      babelrcRoots: BABEL_PATH,
      cacheDirectory: true,
      babelrc: false,
... ...
}

make fullySpecified to works on all files, not only source files, but also node_modules, like:
{
        test: /\.m?js/,
        resolve: {
          fullySpecified: false,
        },
      },
      {
        test: /\.(j|t)sx?$/,
        include: [srcDir],
        exclude: /node_modules/,
        use: [
          {
            loader: 'babel-loader',
            options: {
              cacheDirectory: true,
            },
          },
        ],
      }

similar configuration still not working with webpack 5.1.0
{
test: /\.(mj|j|t)sx?$/,
resolve: {
    fullySpecified: false
  },
  type: "javascript/auto",
  exclude: /node_modules/,
  use: {
    loader: "babel-loader",
    options: {
      cwd: BABEL_PATH,
      babelrcRoots: BABEL_PATH,
      cacheDirectory: true,
      babelrc: false,
... ...
}

make fullySpecified to works on all files, not only source files, but also node_modules, like:
{
        test: /\.m?js/,
        resolve: {
          fullySpecified: false,
        },
      },
      {
        test: /\.(j|t)sx?$/,
        include: [srcDir],
        exclude: /node_modules/,
        use: [
          {
            loader: 'babel-loader',
            options: {
              cacheDirectory: true,
            },
          },
        ],
      }

This solution fixed the problem for me. Thanks alot.

Fixed https://babeljs.io/blog/2020/10/15/7.12.0, please leave feedback

@evilebottnawi just upgraded to babel 7.12 and removed the fullySpecified rule. Works as intended 👍

Awesome

@llooz I actually do not use Babel in my build but still had the same problem.
Do I need to keep the
{
  test: /\.m?js$/,
  resolve: {
    fullySpecified: false
  }
}

rule until all my dependencies upgrade Babel?

@doberkofler for me it was the combination of webpack 5 + babel 7.11 + preset-env + core-js@3 that surfaced the issue.
Once they've fixed the ESM handling on babel 7.12 the issue disappeared.
Unfortunately I can't think of what can it be the issue in your project.

@llooz I actually do not use Babel in my build but still had the same problem.
Do I need to keep the
{
  test: /\.m?js$/,
  resolve: {
    fullySpecified: false
  }
}

rule until all my dependencies upgrade Babel?

You might need to refresh your npm/yarn lockfile.
Check that your currently installed runtime is at least 7.12.0  with npm ls @babel/runtime

This error happens most commonly with Babel. Which is now fixed. But other packages that have not fixed this issue will require that mjs resolution or you want to contact the project author and ask them to update

What really confuses me, is the fact that I actually do not actually have any rules that would use Babel.
Does this problem also arise when webpack just uses packages that have been build with Babel?

@doberkofler For my part I have dependencies which use @babel/runtime-corejs2, I had to remove the entry from yarn.lock then run yarn to install the latest version.

What really confuses me, is the fact that I actually do not actually have any rules that would use Babel.

Some third party packages may contain code compiled via babel, and those file can have an import statement to @babel/runtime

This is what I describe just above, these dependencies are normally defined with a ^ and the lockfile (yarn.lock or package-lock.json) blocks them, you have to remove the entry from the lockfile and then restart an installation to that these update.

If somebody needs help please provide error message

@bertho-zero Thank you. Regarding previous babel 7.11.6 and webpack v5.0.0, I also had been tried the following configuration. But it was failed.
  module: {
    rules: [
      {
        test: /.(js|jsx|mjs)$/,
        exclude: [path.resolve(__dirname, "node_modules")],
        loader: "babel-loader",
        resolve: {
          fullySpecified: false
        }
      },
    ],
  },

With Babel 7.12.0 and Webpack v5.1.0, completely works well. Thank you!

babel v7.12.0 and webpack v5.0.0 also work well without workarounds. It was issue of old babel.

I don't use babel in any of my rules nor is it a dependency in my package.json file.
I did remove my package-lock.json file to update all dependencies.
I am using webpack 5.1.0 but still get a large number of errors like the following when not using this rule
{
	test: /\.m?js$/,
	resolve: {
		fullySpecified: false
	}
}

errors
assets by status 100 MiB [cached] 509 assets
orphan modules 1.53 MiB [orphan] 1026 modules
runtime modules 246 KiB 435 modules
modules by path ./ 14.2 MiB (javascript) 591 KiB (css/mini-extract)
  javascript modules 14.2 MiB 1259 modules
  css modules 591 KiB
    modules by path ./src/ 342 KiB 61 modules
    modules by path ./vendor/ 167 KiB 8 modules
    modules by path ./node_modules/ 81.6 KiB 8 modules
  json modules 62.9 KiB
    modules by path ./node_modules/react-html-parser/node_modules/entities/maps/*.json 30 KiB 4 modules
    modules by path ./node_modules/entities/lib/maps/*.json 30 KiB 4 modules
    ./node_modules/dom-serializer/foreignNames.json 2.79 KiB [built] [code generated]
readable-stream (ignored) 15 bytes [built] [code generated]

ERROR in<EMAIL_ADDRESS>9:0-86
Module not found: Error: Can't resolve './vdom' in '/Users/doberkofler/MyDev/ljs_app/trunk/periscope/node_modules/@fullcalendar/common'
Did you mean 'vdom.js'?
BREAKING CHANGE: The request './vdom' failed to resolve only because it was resolved as fully specified
(probably because the origin is a '*.mjs' file or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
<EMAIL_ADDRESS>8:0-212 9:0-37 9:0-37 36:16-22 36:23-36 36:37-49 39:28-41 39:42-77 40:24-37 40:38-53 45:16-22 49:12-22 52:33-46 53:12-31 88:8-18 105:13-26 119:8-22 122:2-13
 @ ./src/modules/las_mod_dashboard/widget_calendar/index.ts 12:0-46 28:25-33
 @ ./src/modules/las_mod_dashboard/index.ts 29:0-67 63:16-36

ERROR in<EMAIL_ADDRESS>6:0-16
Module not found: Error: Can't resolve './vdom' in '/Users/doberkofler/MyDev/ljs_app/trunk/periscope/node_modules/@fullcalendar/core'
Did you mean 'vdom.js'?
BREAKING CHANGE: The request './vdom' failed to resolve only because it was resolved as fully specified
(probably because the origin is a '*.mjs' file or a '*.js' file where the package.json c...ontains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ./src/modules/las_mod_dashboard/widget_calendar/index.ts 12:0-46 28:25-33
 @ ./src/modules/las_mod_dashboard/index.ts 29:0-67 63:16-36
...

@doberkofler please read the error message, problem in fullcalendar
https://github.com/fullcalendar/fullcalendar/blob/master/packages/core/package.json#L12
But
https://github.com/fullcalendar/fullcalendar/blob/master/packages/core/src/main.ts#L2 :
import './vdom'
export { Calendar } from './Calendar'
export * from '@fullcalendar/common'

import './vdom' is invalid and even works on node, it should be import './vdom.js'

@evilebottnawi So to summarize: this problem can also appear when not explicitly using Babel in 3rd party dependencies and should be reported to the individual maintainers to slowly fix this issue.

@doberkofler yes, because it is invalid, this code will not work on node or browser, so webpack starts to use strict rules for this, even it is not webpack problem, try to use node@14 and run this code, you will get the same problem

I have what I think might be a similar problem using apollo-upload-client, which uses extract-files:
ERROR in ../../../node_modules/apollo-upload-client/public/createUploadLink.js 18:19-63
Module not found: Error: Can't resolve 'extract-files/public/extractFiles' in '/Users/ross/Projects/project/node_modules/apollo-upload-client/public'
 @ ./src/app/state/client.ts 844:0-79 931:42-58
 @ ./src/app/views/app/AppContainer.tsx 283:0-40 335:14-20
 @ ./src/app.js 556:0-56 641:9-21

The author is adamant that it's not a problem with their library.
I have the fullySpecificed: false rule in place, but it's not making a difference. Since the issue lies in a third party library and not our source code, do I need to modify the additional rule to specifically target that library?

@chooban this problem not related to original problem, already reported https://github.com/webpack/enhanced-resolve/issues/256

Hey, I just wanted to chime in with something that might help folks. I just upgraded a home-grown config library to Webpack 5, bumped all my dependencies, and have been integrating this into my various projects. A JavaScript project using @material-ui exploded with these errors when I did this.
The resolve/fullySpecified fix mentioned above did nothing for me. I was stuck here for a bit, but then I found something that did work.
I'm using yarn, and there's the "resolutions" option you can add to the package.json. @material-ui was pulling in @babel/runtime 7.11.1, and I wanted to make sure it was on the latest 7.12.5. So I added this resolution to my package.json:
"resolutions": {
    "@babel/runtime": "^7.12.5"
  },

And viola, everything is fixed now. The fullySpecified option isn't even needed anymore. The app appears to be working fine, although more testing is definitely required.

You could disable that with { test: /\.m?js/, type: "javascript/auto" } in module.rules.

I tried that, but I get the same errors.
My config has it:
const path = require("path");

module.exports = {
    entry: "./dist/main.js",
    output: {
        path: path.resolve(__dirname, "dist"),
        filename: "bundle.js",
    },
    externals: ["fs"],
    module: {
        rules: [{ test: /\.m?js$/, type: "javascript/auto" }],
    },
};

and I still get
BREAKING CHANGE: The request './dom' failed to resolve only because it was resolved as fully specified
(probably because the origin is a '*.mjs' file or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

What's missing?

For the time being, downgrading to Webpack 4 was easier.

I'm really looking forward to when the ecosystem isn't so fragmented around native ESM. That'll be very nice!

There is no problems on webpack side, please read the error message, problem in @lume/element package, they used ES module syntax, but don't use .js/.mjs extensions in import, try to run this code in node or browsers without webpack, you will get the problems

@trusktr Try to install the latest @babel/runtime by npm i @babel/runtime -D, it works for me.

I'm pretty surprised that we got this many comments in without anybody linking to https://github.com/microsoft/TypeScript/issues/16577 -- I'd bet dollars to doughnuts that all the libraries that people are having trouble with were compiled from Typescript, which 1) encourages users to write extensionless relative import specifiers, then 2) does not give any way to convert those to valid (extension-included) specifiers.
(I'm also having this problem with a compiled-from-TS library...)

Having tried quite a few things to debug this, I found eventually that deleting lockfile and node_modules and reinstalling resulted in a working build

Having tried quite a few things to debug this, I found eventually that deleting lockfile and node_modules and reinstalling resulted in a working build

Zach, that very likely means that one of your deps had a bad import specifier which they fixed in a later (but "compatible") release.

Zach, that very likely means that one of your deps had a bad import specifier which they fixed in a later (but "compatible") release.

I believe that fullySpecified: true is a very good default option, because it encourages everyone to work towards the future of ES Modules and to stop supporting anything else that is not spec-compliant. Library authors will have incentive to fix their libs so that they work in Webpack with defaults that enforce ES Module standards. This will make the ecosystem a lot better.
Imagine if fullySpecified: false, we'd have a whole new generation of Webpack where people are writing code that isn't ES Module compliant, and therefore encouraging further fragmentation between real ES Module code and ES-Module-like code.

I believe that fullySpecified: true is a very good default option, because it encourages everyone to work towards the future of ES Modules and to stop supporting anything else that is not spec-compliant. Library authors will have incentive to fix their libs so that they work in Webpack with defaults that enforce ES Module standards. This will make the ecosystem a lot better.
Imagine if fullySpecified: false, we'd have a whole new generation of Webpack where people are writing code that isn't ES Module compliant, and therefore encouraging further fragmentation between real ES Module code and ES-Module-like code.

Ran into this issue with Babel 7.11.~ after updating to Webpack 5.
Enumerating the error messages here so other people looking for help will find the fix here.
Can't resolve './objectWithoutPropertiesLoose'
Can't resolve './arrayWithHoles'
Can't resolve './iterableToArrayLimit'
Can't resolve './unsupportedIterableToArray'
Can't resolve './nonIterableRest'
Can't resolve './arrayWithoutHoles'
Can't resolve './iterableToArray'
Can't resolve './unsupportedIterableToArray'
Can't resolve './nonIterableSpread'

BREAKING CHANGE: The request './<module>' failed to resolve only because it was resolved as fully specified

Fix (as mentioned above):
Add the following rule to your webpack.config.js:
--snip--
 module: {
    rules: [
        {
            test: /\.m?js/,
            resolve: {
                fullySpecified: false
            }
        },
--snip--

babel-plugin-proposal-private-methods from<EMAIL_ADDRESS>worked as well and doesn't require the extra webpack rule for node_modules
{
  "env": {
    "development": {
      "plugins": [
        [
          "@babel/plugin-proposal-private-methods",
          {
            "loose": true
          }
        ]
      ]
    },
  }
}

If you're using chainWebpack, then it's like this
chain.module.rule("mjs-rule").test(/.m?js/).resolve.set(fullySpecified, false);

btw this is not an webpack-only error. If you run<EMAIL_ADDRESS>in node.js you get an error too:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '...\node_modules\@babel\runtime-corejs3\core-js\object\define-property' imported from<EMAIL_ADDRESS>

You could disable that with { test: /\.m?js/, type: "javascript/auto" } in module.rules.

Ok I tried that by myself and it doesn't work correctly. Instead you have to do that to change the resolving for these modules:
{
  test: /\.m?js/,
  resolve: {
    fullySpecified: false
  }
}

type: "javascript/auto" might be added to fully disable the different behavior for .mjs files, but that doesn't affect the resolving. It only affects e. g. how interop with non-ESM modules is handled.

This fixed it for me

(webpack-internal:///./node_modules/next/dist/pages/_document.js:16:1)
this error show in next js project

Can anyone solve this please... i am getting it in the browser console :)
Uncaught TypeError: (0 , codecs_data_structures_1.getBytesCodec) is not a function     at<EMAIL_ADDRESS>(state.ts:7:1)     at options.factory (react refresh:6:1)     at __webpack_require__ (bootstrap:22:1)     at fn (hot module replacement:61:1)     at<EMAIL_ADDRESS>(index.ts:4:1)     at options.factory (react refresh:6:1)     at __webpack_require__ (bootstrap:22:1)     at fn (hot module replacement:61:1)     at ./node_modules/<EMAIL_ADDRESS>(actions.ts:4:1)     at options.factory (react refresh:6:1)


Developer Portal bot  and azure bot

what the different of Developer Portal bot  and azure bot,
can i create a bot by Developer Portal bot in production environment, or i must use azure to create a bot in production environment
i want use graph api、Authentication and so on

anyone can help me? wait....

@86driver - You can choose either way to create bot. In both ways you can add API permissions, Authentication etc.
Ref: https://learn.microsoft.com/en-us/microsoftteams/platform/resources/bot-v3/bots-create#create-a-bot-for-microsoft-teams
Using dev portal: https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/teams-developer-portal
Using Azure Portal: https://learn.microsoft.com/en-us/azure/bot-service/abs-quickstart?view=azure-bot-service-4.0&tabs=userassigned

@86driver - You can choose either way to create bot. In both ways you can add API permissions, Authentication etc. Ref: https://learn.microsoft.com/en-us/microsoftteams/platform/resources/bot-v3/bots-create#create-a-bot-for-microsoft-teams Using dev portal: https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/teams-developer-portal Using Azure Portal: https://learn.microsoft.com/en-us/azure/bot-service/abs-quickstart?view=azure-bot-service-4.0&tabs=userassigned

thanks a lot, and i have some confuse else.
is any different between Developer Portal bot and azure bot, i found some Ms teams sample tell me:
link here,
if i create a bot by  Developer Portal, should i must register channel as Ms teams? if so, how can i register，

There is no such difference. However, it would be better if you create bot using Azure.
Yes, if you have created bot by Developer Portal, you should register channel as MS teams.

There is no such difference. However, it would be better if you create bot using Azure. Yes, if you have created bot by Developer Portal, you should register channel as MS teams.

thanks a lot , it very helpful to me, and i found if i create a bot by developer portal, it will auto register channel as MS teams, so I don't need to manually register

We are closing this issue for now. Please feel free to reopen if required. Thanks!


Ki4a does not terminate gracefully

In the version of the app built with this repository, the VPN connection is not closed when ki4a gets disconnected this disable the connection for the device, without any other solution than "Forgetting" the VPN.
This issue was not present in the old version, this is therefore a regression.

Fixed with last push


ColorPicker suddenly eating CPU

Microsoft PowerToys version
0.51.1
Running as admin

[X] Yes

Area(s) with issue?
ColorPicker
Steps to reproduce
Be away from PC, return to it to find CPU causing fan to run.   ColorPicker was the culprit, and it wasn't being used.

✔ Expected Behavior
Not eating CPU, especially when I'm not using it.
❌ Actual Behavior
ColorPicker is eating CPU.
Other Software
N/A

any chance you can do a dump file and share?

need it while it is in this state

any chance you can do a dump file and share?

How do I do that?

Right click on exe and create dump in task manager.

(we recently renamed DLLs / Exes so mine are a smidge different)

Unfortunately I've not been able to reproduce it (yet).  After this initially occurred, I killed the process and then created this bug report.   If/when this happens again, I'll provide a dump file.

If it happens again, please do the dump so we can see what is going on. As of now, we don’t have a way of reproducing the issue / seeing the problem.
I’m going to close this out and just creat a new issue with the dump and say it maxed at 100 again


Add replace_class argument to attr.s

This allows us to harmonize class creation for dict and slots classes.
Interestingly this seems to break our Hypothesis strategies.  I can't dig any further right now but I wanted to put it out there.  Helpful comments welcome.
Ref #223 #202

I’m happy to take a look
On Friday, October 6, 2017, Hynek Schlawack<EMAIL_ADDRESS>wrote:

This allows us to harmonize class creation for dict and slots classes.
Interestingly this seems to break our Hypothesis strategies. I can't dig
any further right now but I wanted to put it out there.
Ref #223 https://github.com/python-attrs/attrs/issues/223 #202
https://github.com/python-attrs/attrs/issues/202
You can view, comment on, or merge this pull request online at:
https://github.com/python-attrs/attrs/pull/260
Commit Summary

Add replace_class argument to attr.s
Use replaced classes in testing strategy

File Changes

A changelog.d/260.deprecation.rst
https://github.com/python-attrs/attrs/pull/260/files#diff-0 (8)
M docs/api.rst
https://github.com/python-attrs/attrs/pull/260/files#diff-1 (2)
M src/attr/_make.py
https://github.com/python-attrs/attrs/pull/260/files#diff-2 (10)
M tests/test_dark_magic.py
https://github.com/python-attrs/attrs/pull/260/files#diff-3 (80)
M tests/utils.py
https://github.com/python-attrs/attrs/pull/260/files#diff-4 (14)

Patch Links:

https://github.com/python-attrs/attrs/pull/260.patch
https://github.com/python-attrs/attrs/pull/260.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/python-attrs/attrs/pull/260, or mute the thread
https://github.com/notifications/unsubscribe-auth/AB0h8Qc8dZeGrjl_PSN85kJg4b19oUY2ks5spkx0gaJpZM4PwrtR
.

A few more notes:

I'm not married to the naming.
I’m not raising a warning because it seems unfortunate to force people into setting the argument and makes it kind of impossible to remove it later.  My hope is that most people don't ever realize that we changed something underneath.

Hm after a 5 minute investigation, there seems to be a problem with copy.copy on classes that are replace_class=True, frozen=True (and only those, slot classes are OK). Will look into it more later.
On a side note, is it possible to overwrite the class __repr__? As in, not the instance repr. Our Hypothesis classes are called HypClass, would be nicer if their repr had the flags too.

Just to add another thought: my wish is that ideally, nobody notices a difference at all.  So a three stage approach with a *kw-warning in two years seems best:

now: add option, default is False
Oct 2018: default is True
Oct 2019: option becomes a nop and starts raising a warning

Now, this kind of costs us a pointless year because people are not gonna try out that option unless they have a problem.  It's like with pre-releases, nobody tests them.
Ergo, in Oct 2018, there will be people yelling at us in any case and we've maybe saved <0.01% of our users some headaches.

OTOH, I think I’ll do it anyway because I'm totally not ready to break hashing a second time this year. :|  Also we'll be able to point to this: yes we did the right thing.
I really hope this is the last fundamental screwup in attrs. :|

I’d really like more input on this…happily also from @wsanchez @Lukasa @DRMacIver @wbolster @hawkowl

I have added the current plan to the news fragment.

I don't think I actually understand the problem well enough to comment yet. What actually is the interaction with hashing and equality here that causes the problem?
I assume the "super" problem is that if I have something like:
@attr.s()
class Foo(Bar):
    def stuff(self):
        return super(Foo, self).stuff()

Then the "Foo" in the method is different from the Foo outside the method and this causes a supertype mismatch of some sort? I assume the class you're creating can't be a subclass of the existing Foo.

OK. I've now done the reading of the news fragment and understand some of this better.
On the hashing thing... I think I'd personally be inclined to be less nice than you. I would argue that getting a hash when passing hash=False is just a bug and people relying on it are relying on a bug, and that just fixing that bug would be a non-breaking change. As you say, people are going to suffer that change at some point anyway, so I think you might as well just rip off the band-aid.
Personally the idea of adding a replace_class argument to attr.s doesn't sit well with me, especially when defaulting it to false. One of the rules we have in Hypothesis code review is that when adding a setting you're supposed to ask whether the user is ever likely to actually have a reason to care about the value of this setting. When adding a new scary change the user might care about being able to back it out, but they're certainly not going to care to opt into it because replace_class is about as internal to attrs as it gets.
Were it me I would adopt the following plan:

No optional behaviour. Just opt everyone into this straight up.
Think real hard about possible gotchas and how to fix them.
Before releasing, try running the test suite of a few of the larger open source users of attrs and see if anything hilarious happens.
Be on the ball for a certain amount of user screaming.
In the unlikely event that there are any actual unfixable bugs caused by this, add a replace_class option defaulting to True that emits a warning when you set it to False.

Note however this is coming from the guy who thought "Lets get real drunk and turn coverage on for every Hypothesis user" was a good idea, so I may have more of a YOLO attitude to feature evolution than you are comfortable with. 😉

I tend to agree with @DRMacIver, though it's possible that all the wine I had over the weekend is influencing me into associating with the "Lets get real drunk and…" camp.
I certainly agree regarding the hashing behavior; that's a bug and it should just get fixed.  I don't see a strong argument for bending over to provide compatibility there; at a minimum, I'd have replace_class default to True, but as a user I'd rather fix the bug if this effects me than opt into buggy behavior.  (But, to be fair, I also don't expect his to effect me.)

I’d like to stress one thing: hash=False is supposed to give you hash-by-id, iff, cmp=False on Python 3.  It will always give you one on Python 2.
What we could do is using this as a unification/simplification for creating classes and attach object.__hash__ for non-slot classes to not breaking any compatibility.

Then continue with #202 and use an enum to control what actually happens and deprecate using bool for the hash argument. 🤔

@hynek that sounds sensible to me.

OK, I’ve spent yesterday basically rewriting the class generation code because the old one was all about tacking on and then copying or removing.
Now it's much cleaner.  There might be some doc inconsistencies I guess?  I’m much happier with how it works now.

What we could do is using this as a unification/simplification for creating classes and attach object.hash for non-slot classes to not breaking any compatibility.

Sorry, I somehow misparsed what you originally said which was totally unambiguous but not quite what I thought the good idea was.
What I would actually recommend here is that the default behaviour is to attach a __hash__ which calls object.__hash__ and emits a deprecation warning saying that if this is the behaviour you want then you should be explicit about wanting it.

What I would actually recommend here is that the default behaviour is to attach a hash which calls object.hash and returns its value, but also emits a deprecation warning saying that if this is the behaviour you want then you should be explicit about wanting it.

The problem is that as of now, there is no explicit way of defining it.  You totally can ask for unhashable but with cmp and the behavior also differs between Python versions.  That’s why I want to start raising a warning as soon as there is actually a good way.

So I’m not gonna ask you to review and risk to share the blame.  Mut what I am gonna ask you is to run it against your code bases and report back any breakage you encounter.  Technically, nothing should break.
I just did that and the result is 6dd4b1d.  I’ll take all the blame, but please help me not have an emergency 17.4 by running your test suite once. :D

FWIW I've run the Hypothesis test suite with these changes and it seems fine, but I also don't think Hypothesis makes interesting enough use of attrs that that's a meaningful test of anything.

I got one:
import attr
from typing import TypeVar, Generic

G = TypeVar('G', bound=int)

@attr.s
class A(Generic[G]):
    a = attr.ib()

Works with PyPI, not with this branch (on 3.6). GL :D

Thanks @DRMacIver, your look is very much appreciated!
@Tinche not sure if trolling? :)

I'm not trolling, this was a failure from my work codebase. I've simplified it of course.

Related to the type work, not this PR right?  Maybe open new issue and set milestone?

Well so I was wrong… this did break my code, specifically, this test.
This isn't my favorite code, so please don't judge me.  :-)
I have a hack mix-in class I use for attrs-classes where I want some simple control over how comparisons are done… anyway it fails here.

(I'm 100% OK with changing this code, by the way, just reporting on test results, as requested.)

Great news everyone, we’ve got ourselves another edge case:
import attr

@attr.s
class BaseNoSlots:
  def __init_subclass__(cls, param, **kwargs):
    super().__init_subclass__(**kwargs)
    cls.param = param

@attr.s
class Foo(BaseNoSlots, param='foo'):
  pass

print(Foo.param)

This is taken from #269 and https://repl.it/Mmkb/0
Since we didn’t intervene into the class generation for non-slots before, it just worked.
Now we get:
>>> import attr
...
... @attr.s
... class BaseNoSlots:
...   def __init_subclass__(cls, param, **kwargs):
...     super().__init_subclass__(**kwargs)
...     cls.param = param
...
... @attr.s
... class Foo(BaseNoSlots, param='foo'):
...   pass
Traceback (most recent call last):
  File "<stdin>", line 10, in <module>
  File "/Users/hynek/Projects/attrs/src/attr/_make.py", line 573, in attrs
    return wrap(maybe_cls)
  File "/Users/hynek/Projects/attrs/src/attr/_make.py", line 566, in wrap
    return builder.build()
  File "/Users/hynek/Projects/attrs/src/attr/_make.py", line 379, in build
    cd,
TypeError: __init_subclass__() missing 1 required positional argument: 'param'
__init_subclass__() missing 1 required positional argument: 'param'

@RonnyPfannschmidt sooo…how could metaclasses help here without making stuff runtime-dynamic?

In any case: I’m going to make this PR only about the refactoring which is a net win.  Then we’ll get attrs 17.3 out of the door and then we‘ll tackle it again.  Maybe we’ll find a better way to attach slots.


Farcaster frame support

https://warpcast.notion.site/Farcaster-Frames-4bd47fe97dc74a42a48d3a234636d8c5
This can probably just build off of the GitHub README badge infra

It would be nice if the widgets were links to the OSO url like https://www.opensource.observer/user/widget
And to have action buttons forward likes back to OSO


Calling configuration.dependencies.addAllLater(project.provider { ... }) results in a ClassCastException

Expected Behavior
A call to addAllLater(project.provider { listOf(...) }) adds the items lazily evaluated by the provider to the collection.
Current Behavior
A ClassCastException is thrown:
Cause 5: java.lang.ClassCastException: org.gradle.api.internal.provider.DefaultProvider cannot be cast to org.gradle.api.internal.provider.CollectionProviderInternal
        at org.gradle.api.internal.DefaultDomainObjectCollection.addAllLater(DefaultDomainObjectCollection.java:296)
        at org.gradle.api.internal.DelegatingDomainObjectSet.addAllLater(DelegatingDomainObjectSet.java:105)
        ...

Steps to Reproduce
For example, call addLater with a Provider constructed as project.provider { ... } on a  Configuration's dependencies.
Your Environment
Gradle 6.5

I agree it would be nice to support a list of things. We're kind of blocked by type safety constraints here, because generic type support in providers would then prevent us from telling what kind of provider is expected...

@h0tk3y You should be able to work around this issue by bouncing through objects.listProperty(<type>).value(listOf or providers {}).
@melix The workaround would gives a list with the correct type.

Thanks, the workaround works for me.


Video files are directly accessible via HTML5 player

While exploring the current player, I found a bug :- video files are directly accessible (without auth) via tracking network requests.
Only HTML5 file playback support, vunerability is access to files via tracking network requests. Implementation of VHS would rectify lack of unsupported prototcol within player, HLS would mitigate file download, player.js would assist in offiscating playback URL.
Via tracking network requests, download files directly.
HLS Playback issue. Insert HLS URL into URL field supported upload area for video asset.  When attempting playback, playback fails due to lack of HLS support.

TODO
Fork streama-player to understand mechanisms
TODO
Implement [VHS] https://github.com/videojs/http-streaming
TODO
Merge request

Expected Behaviour
Video assets should not be accesable via network tracking. Assest need to be as secure as possible and not accesible to avoid unnecessary copyright legal infringements.
Video delivery should at a minimum be HLS and include AES128 encryption, tokening to avoid direct download.
Actual Behaviour
All files should only be accesible if enabled in functionaity settings, optional. Currently files are accesible whether download is enabled or disabled via network tracking.
Environment Information
Intellij IDE, Ubuntu 20.04 LTS

Hi,
Thanks for pointing this out. So are you saying that I can access a video file directly without authentication? because I doubt that very much. Or are you saying that through network tracking, while a user plays the video and requests chunk after chunk, that the file is recreatable on the trackers host? and if so, is the latter even feasable? and what would happend if the user doesnt watch till the end, isnt it then a corrupt video file anyway? Please elaborate

Hi Dularion,
Thank you for the responce. I will dig deeper to confirm.
see :- https://ibb.co/t4C1Wk6

Hi Dularion, Hope this helps for all those people needing and requesting HLS support.
Method for Streama Video Player + HLS.js
Sources:

https://github.com/cruurds/streama-video-player
https://github.com/video-dev/hls.js/

To integrate HLS.js into Streama Video Player:

clone https://github.com/cruurds/streama-video-player
bower install
bower install hls.js
include hls.js dist file to player
EXAMPLE -

...

Make sure the contentType is "contentType": "application/vnd.apple.mpegurl" or  "contentType": "application/x-mpegurl" - note that application/x-mpegurl is more android friendly

I haven't check the complete video options nor any other settings from Streama Player, this is a basic integration of HLS on streama player
This will answer many requests for HLS playback in streama. Thanks Dularion :-)

As far as I know it was never the goal of streama to prevent logged in users to download video files, which seems to be your complaint?
I don't quite understand how it would help with anything copyright-related to forbid access to the video files themselfes, while still allowing video streaming; either you stream your own content to your own devices, which would probably be legal, or you want to make it public, which would be illegal under many jurisdictions. Wether the user can download the file itself is not important for this.
In my eyes, the only thing this does is add another layer of complexity and another library when plain html5 video playback works just fine for the intended use of streama.

streama-video-player-hls.zip
Working Streama Player with HLS.js

Hi Dularion, hls.js incorporates functionalities for Safari 8+ for MacOS 10.10+
Safari for ipadOS 13+. That currently does not have a streama player. It would be good to incorporate the Streama player system with the contribution of cruurds ...
HLS.js is compatible with:
Chrome 39+ for Android
Chrome 39+ for desktop
Firefox 41+ for Android
Firefox 42+ for desktop
IE11 for Windows 8.1+
Edge for Windows 10+
Safari 8+ for MacOS 10.10+
Safari for ipadOS 13+

serving HLS see https://github.com/arut/nginx-rtmp-module
For file preperation use ffmpeg
example using FFMPEG NVIDIA, 3 adaptive rate 3M, 2M, 1M - h264

create a file called convert.sh in the original content folder
#! /bin/bash
for file in $( find ./ -iname ".mp4" -o -iname ".avi" -o -iname ".mkv")
do
OIFS="$IFS"
IFS=$'\n'
ffmpeg -threads 1 -vsync 1 -hwaccel:v "cuvid" -hwaccel_output_format:v "cuda" -y -i "$file"
-filter_complex
"[0:v]split=3[v1][v2][v3];
[v1]scale=w=1920:h=1080[v1out]; [v2]scale=w=1280:h=720[v2out]; [v3]scale=w=640:h=360[v3out]"
-map [v1out] -c:v:0 h264_nvenc -rc:v vbr_hq -rc-lookahead:v 32 -refs:v 16 -crf 18 -b:v:0 3M -maxrate:v:0 3M -minrate:v:0 3M -g 48 -sc_threshold 0 -keyint_min 48
-map [v2out] -c:v:1 h264_nvenc -rc:v vbr_hq -rc-lookahead:v 32 -refs:v 16 -crf 18 -b:v:1 2M -maxrate:v:1 2M -minrate:v:1 2M -g 48 -sc_threshold 0 -keyint_min 48
-map [v3out] -c:v:2 h264_nvenc -rc:v vbr_hq -rc-lookahead:v 32 -refs:v 16 -crf 18 -b:v:2 1M -maxrate:v:2 1M -minrate:v:2 1M -g 48 -sc_threshold 0 -keyint_min 48
-map a:0 -c:a:0 aac -b:a:0 128k -strict -2
-map a:0 -c:a:1 aac -b:a:1 96k -strict -2
-map a:0 -c:a:2 aac -b:a:2 48k -strict -2
-f "mp4" -movflags "+faststart" "/your_folder/${file%.}.mp4"
mv "$file" "/your_folder/source_files/${file%.*}.mp4"
IFS="$OIFS"
done
chmod to executable convert.sh
create the "your_folder" output folders
screen -d -m -S transcode ./convert.sh (will run the sh in a background screen)

Note that these prepared .mp4 files are muxed. They will play in the non HLS, standard streama player at highest bitrate only. In the HLS version of streama player using HLS delivery (nginx-rtmp, flussonic, wowza) the prepared files will deliver in an adaptive HLS stream which by default will autoselect the best bitrate for enduser.


strip_received_headers sends headers when using API

Describe the bug
When using the Postal HTTP API with strip_received_headers set to true, Postal doesn't strip the received headers from the email.
Expected behaviour
I expect Postal to strip the headers.
Additional information/context
I'd be happy to open a PR to fix this, the issue lies in the outgoing_message_prototype having different behaviour from the SMTP server client:
https://github.com/postalserver/postal/blob/main/lib/postal/smtp_server/client.rb#L381 (strips header)
https://github.com/postalserver/postal/blob/main/app/models/outgoing_message_prototype.rb#L178 (does not strip header)

Have you seen #2781 ?

@willpower232 I believe it's different, that issue seems to be about customizing the value of the header - whereas this issue relates to the HTTP API not having the header stripped, when the config value to strip the received header is enabled.

It does appear that this feature was only partially implemented and did not include the API, just the SMTP server.
However, I am planning to remove it entirely in favour of a new 'privacy mode' which I have just described in #2781. Therefore, I'm not going to fix this.


[Final sample cleanup] nodejs\02.echobot-with-counter

[x] Is numbered and   named correctly and following the spec
[x] All files have been spell checked
[x] All style cop/ linting issues have   been addressed
[x] Include all DCR changes

[x] Explicit state save
[x] Method name changes begin, end etc

[x] Does not use mainDialog unless that   file actually extends Dialog/ ComponentDialog
[x] Compiles with latest packages
[x] Runs per instructions in README
[x] Add commented out code to use blob   storage
[x] Update to look for production/   local (bot configuration)
[x] onTurnError at adapter
[x] Include .env or appsettings.json or   web.config with botFilePath and botFileSecret
[x] Deployment scripts folder has been   cleaned up and only includes msbot export files
[x] README to include

[x] msbot clone steps
[x] Tools install/ uninstall
[x] Concise set of steps to run the sample
[x] Remove any references to azure deploy

[x] C# sample -- Include .bot file in the build output
[x] Includes the latest bot file (padlock)
[x] remove and sort usings
[x] remove azuredeploy.* under   deploymentscripts folder (if any)

@sgellock - pushed up a commit to fix PR feedback. Thank you!


outdated extension

now with php8.1 and magento2.4.5, this extension is outdated.

now with php8.1 and magento2.4.5, this extension is outdated.

I'm out of magento and php world. the extension doesn't work anymore?

I've transferred the repo to @motou who hopefully will have some time to invest in this extension and bring it up to date.

thanks man, appreciate it
On Fri, Sep 16, 2022 at 8:25 PM Claudiu Creanga @.***>
wrote:

I've transferred the repo to @motou https://github.com/motou who
hopefully will have some time to invest in this extension and bring it up
to date.
—
Reply to this email directly, view it on GitHub
https://github.com/ClaudiuCreanga/magento2-store-locator-stockists-extension/issues/54#issuecomment-1249501463,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2RZVRSVUIWVRGMBCTSKOEDV6SGNLANCNFSM6AAAAAAQNI632I
.
You are receiving this because you authored the thread.Message ID:
<ClaudiuCreanga/magento2-store-locator-stockists-extension/issues/54/1249501463
@github.com>

hi @motou ! Could you please update composer.json and add support for php 8.3 ? We want use this module on Magento 2.4.7-p2 php 8.3.
Thanks in advance!
Maciej

Yes sure, I hope that I can find some time this week to update the plugin dependencies.

cool! very appreciate

hi @motou  - did you have time to check my request ? I added PR to make it faster


Closing soft keyboard when scrolling history

It is irritating me (and my friends) when I scroll the history in VectorRoomActivity.java and it's calling dismissKeyboard method. Why? It looks slowly. I try to surround the scrolling but seeing the history is need in most causes. And yes - hiding keyboard (when I don't want) is not ease.

I have a suggestion: to give an option for users about this feature(?) in settings activity.


fixed condidates spinup

What type of PR is this?
kind ui-change
What this PR does / why we need it:
spinup candidates was looking buggy
Which issue(s) this PR fixes:
Fixes #967


CUDA runtime error: an illegal memory access

Not always but sometimes, I got this error:
CUDA runtime error: an illegal memory access was encountered /codegeex-fastertransformer/src/fastertransformer/utils/memory_utils.cu:94
It is so weird :)

+1

try the updated batch_inf branch


AbstractRabbitListenerContainerFactory throws NullPointerException after upgrade to 2.1.2.RELEASE

After upgrading to spring-boot 2.1.1 we got a NullPointerException when both Hibernate and RabbitAutoConfiguration are initializing. It seems to be a corner case which makes it hard to reproduce on a small test project that makes sense, but the stacktrace ends with:
Caused by: java.lang.NullPointerException: null 	at org.springframework.amqp.rabbit.config.AbstractRabbitListenerContainerFactory.getAdviceChain(AbstractRabbitListenerContainerFactory.java:198) 	at brave.spring.rabbit.SpringRabbitTracing.decorateSimpleRabbitListenerContainerFactory(SpringRabbitTracing.java:170) 	at org.springframework.cloud.sleuth.instrument.messaging.SleuthRabbitBeanPostProcessor.postProcessBeforeInitialization(TraceMessagingAutoConfiguration.java:186) 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:419) 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1737) 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576) 	... 41 common frames omitted
After checking the changes in AbstractRabbitListenerContainerFactory it seems to be related to changes done in this commit https://github.com/spring-projects/spring-amqp/commit/2ef76b4bb2aa1b174894ae1845edf305deaa3052#diff-26d26e39a825e80840186d082e3c1eaa. The JavaDoc of getAdviceChain looks like it would be possible to have the adviceChain being null, but by adding the Arrays.copyOf as done in this commit will cause NullPointerExceptions when it is actually null.

Thanks for reportingl - already fixed on master : https://jira.spring.io/browse/AMQP-846


remove crate:: when use is already present

[X] I have split my patch into logically separate commits.
[X] All commit messages clearly explain what they change and why.
[X] PR description sums up the changes and reasons why they should be introduced.

This PR is just to remove redudant import from crate:: when use:scylla is already present in auth.rs.

Thanks for the contribution!


GridDeviceMetadata: qubit ordering within a pair

Description of the issue
Today GridDeviceMetadata always stores qubit_pairs such that the left <= right (lexicographically) in a pair, so the pair (right, left) is not in GridDeviceMetadata.qubit_pairs.
Is this intended behavior? AFAIU the DeviceSpecification proto doesn't guarantee an ordering within a qubit target. The caller could sort the pair before checking against qubit_pairs, in which case the fix is a docstring change for qubit_pairs. Or alternatively qubit_pairs can be implemented with a special set that accepts pairs in both directions.
How to reproduce the issue
Flip one of the qubits here and rerun the test.
Cirq version
0.14
@MichaelBroughton

We assume that GridDevice will always be symmetrical, so if there's a device where a 2-qubit gate can only be done in one direction, then we should create a new gate type and corresponding new device metadata type.
For device specification proto: Calibration metrics are not in the device proto but assume bidirectionality. Device specification proto can specify one-way edges. So, we should introduce a new asymmetric type or raise an error.

To clarify, this bug is indeed about the bidirectional case. The bug (or feature?) is that a pair (l, r) is only considered to be in qubit_pairs if l < r, even though (r, l) is a valid pair. Today the DeviceSpecification is allowed to specify either (l, r) or (r, l).
We could either make GridDeviceMetadata keep the requirement that l < r, in which case the docstring needs to be updated and the caller can sort the pair, or remove that requirement.

I think this should be automatic.  GridDeviceMetaData should sort the pairs automatically for you, removing the burden from the caller, and making the behavior consistent.

That's my preference as well. Will send out a fix.


is it possible to change the shape of the ActionButton.item?

Say I wanted the actionbutton.item to be a rectangle rather than a circle?

were you able to make it in different shape?