Error in notebook "quantum_emoticon": unable to get counts

Description
These are the steps I followed to get the error:

Clone repo: git clone https://github.com/QISKit/qiskit-tutorial.git (commit 37faf8bede71242f36c80e76f3c7a8b02395da58)
cd qiskit-tutorial/
Create file: vi 0_hello_world/Qconfig.py:

APItoken = 'XXX...XXX'
config = {'url': 'https://quantumexperience.ng.bluemix.net/api'}

if 'APItoken' not in locals():
    raise Exception('Please set up your access token. See Qconfig.py.')

pip install -r requirements.txt
jupyter notebook index.ipynb
Go to notebook "Quantum Emoticon"
Run first piece of code to produce the measures and get the counts

I got the following errors:
WARNING:IBMQuantumExperience.IBMQuantumExperience:Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=XXX...XXX: {"error":{"status":400,"message":"Error parsing QASM. Error parsing qasm number 0. Gates after a measure are blocked","code":"QASM_NOT_VALID","statusCode":400}}
WARNING:IBMQuantumExperience.IBMQuantumExperience:Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=XXX...XXX: {"error":{"status":400,"message":"Error parsing QASM. Error parsing qasm number 0. Gates after a measure are blocked","code":"QASM_NOT_VALID","statusCode":400}}
WARNING:IBMQuantumExperience.IBMQuantumExperience:Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=XXX...XXX: {"error":{"status":400,"message":"Error parsing QASM. Error parsing qasm number 0. Gates after a measure are blocked","code":"QASM_NOT_VALID","statusCode":400}}
WARNING:IBMQuantumExperience.IBMQuantumExperience:Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=XXX...XXX: {"error":{"status":400,"message":"Error parsing QASM. Error parsing qasm number 0. Gates after a measure are blocked","code":"QASM_NOT_VALID","statusCode":400}}
WARNING:IBMQuantumExperience.IBMQuantumExperience:Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=XXX...XXX: {"error":{"status":400,"message":"Error parsing QASM. Error parsing qasm number 0. Gates after a measure are blocked","code":"QASM_NOT_VALID","statusCode":400}}

And this trace:
ResultError                               Traceback (most recent call last)
<ipython-input-1-72b078066956> in <module>()
     31 # run and get results
     32 results = qp.execute(["smiley_writer"], backend='ibmqx5', shots=1024)
---> 33 stats = results.get_counts("smiley_writer")

~/anaconda3/envs/QISKitenv/lib/python3.6/site-packages/qiskit/_result.py in get_counts(self, name)
    231         """
    232         try:
--> 233             return self.get_data(name)['counts']
    234         except KeyError:
    235             raise QISKitError('No counts for circuit "{0}"'.format(name))

~/anaconda3/envs/QISKitenv/lib/python3.6/site-packages/qiskit/_result.py in get_data(self, name)
    202             exception = self._result['result']
    203             if isinstance(exception, BaseException):
--> 204                 raise exception
    205             else:
    206                 raise QISKitError(str(exception))

~/anaconda3/envs/QISKitenv/lib/python3.6/site-packages/qiskit/_jobprocessor.py in _job_done_callback(self, future)
     97     def _job_done_callback(self, future):
     98         try:
---> 99             result = future.result()
    100         except Exception as ex:  # pylint: disable=broad-except
    101             result = Result({'job_id': '0', 'status': 'ERROR',

~/anaconda3/envs/QISKitenv/lib/python3.6/concurrent/futures/_base.py in result(self, timeout)
    423                 raise CancelledError()
    424             elif self._state == FINISHED:
--> 425                 return self.__get_result()
    426
    427             self._condition.wait(timeout)

~/anaconda3/envs/QISKitenv/lib/python3.6/concurrent/futures/_base.py in __get_result(self)
    382     def __get_result(self):
    383         if self._exception:
--> 384             raise self._exception
    385         else:
    386             return self._result

~/anaconda3/envs/QISKitenv/lib/python3.6/concurrent/futures/thread.py in run(self)
     54
     55         try:
---> 56             result = self.fn(*self.args, **self.kwargs)
     57         except BaseException as exc:
     58             self.future.set_exception(exc)

~/anaconda3/envs/QISKitenv/lib/python3.6/site-packages/qiskit/_jobprocessor.py in run_backend(q_job)
     52                 circuit['compiled_circuit'] = compiled_circuit
     53     backend = qiskit.backends.get_backend_instance(backend_name)
---> 54     return backend.run(q_job)
     55
     56

~/anaconda3/envs/QISKitenv/lib/python3.6/site-packages/qiskit/backends/_qeremote.py in run(self, q_job)
     98                                    hpc=hpc)
     99         if 'error' in output:
--> 100             raise ResultError(output['error'])
    101
    102         logger.debug('Running on remote backend %s with job id: %s',

ResultError: QASM_NOT_VALID: Error parsing QASM. Error parsing qasm number 0. Gates after a measure are blocked

Your Environment

Tutorial branch: master
QISKit SDK version: QISKit-0.4.8
Python version: Python 3.6.4 :: Anaconda, Inc.

I get the same error

Hi,
Thank you for pointing this. I also got the same error when running the notebook. It is due to a bug in compiler that swap measurement to the middle of  the computation but the devices do not support such operation yet. I confirmed that I can avoid the error by inserting barrier before measurement, like:
#put barrier before measurement
qc.barrier(qr)
# measure
for j in range(16):
    qc.measure(qr[j], cr[j])

# run and get results
results = qp.execute(["smiley_writer"], backend='ibmqx5', shots=1024, timeout=240)
stats = results.get_counts("smiley_writer")

I cannot run the real device now because it is under maintenance.

Hi @rraymondhp, thanks a lot for your answer!!! Very helpful.
BTW, I just realised that this same problem was reported in IBM Q Experience Community too: Code not working on IBMQX5.
Thanks again for your help.

Thank you @rraymondhp https://github.com/rraymondhp !! now it works without errors!
Kind regards,
Antonello

Il giorno 03/feb/2018, alle ore 03:28, Rudy Raymond<EMAIL_ADDRESS>ha scritto:
Hi,
Thank you for pointing this. I also got the same error when running the notebook. It is due to a bug in compiler that swap measurement to the middle of the computation but the devices do not support such operation yet. I confirmed that I can avoid the error by inserting barrier before measurement, like:
#put barrier before measurement
qc.barrier(qr)
measure
for j in range(16):
qc.measure(qr[j], cr[j])
run and get results
results = qp.execute(["smiley_writer"], backend='ibmqx5', shots=1024, timeout=240)
stats = results.get_counts("smiley_writer")
I cannot run the real device now because it is under maintenance.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/QISKit/qiskit-tutorial/issues/88#issuecomment-362768424, or mute the thread https://github.com/notifications/unsubscribe-auth/AeTVzB_9PoZqlgVGEc-TqAigdd3nSEBbks5tQ8RHgaJpZM4RzFoc.

I get same error. Thank you @rraymondhp.

@rraymondhp  I added the barrier statement just like you mentioned in the quantum-emoticon sample.
It did run once without error.
But now i get the following error:
---------------------------------------------------------------------------
QISKitError                               Traceback (most recent call last)
<ipython-input-2-de74e9d080e0> in <module>()
     34 # run and get results
     35 results = qp.execute(["smiley_writer"], backend='ibmqx5', shots=1024)
---> 36 stats = results.get_counts("smiley_writer")

/ibmq/anaconda/lib/python3.6/site-packages/qiskit/_result.py in get_counts(self, name)
    231         """
    232         try:
--> 233             return self.get_data(name)['counts']
    234         except KeyError:
    235             raise QISKitError('No counts for circuit "{0}"'.format(name))

/ibmq/anaconda/lib/python3.6/site-packages/qiskit/_result.py in get_data(self, name)
    204                 raise exception
    205             else:
--> 206                 raise QISKitError(str(exception))
    207
    208         try:

QISKitError: 'QISkit Time Out'

Hi,
It is likely because there are too many job queue for the ibmqx5. The last time I heard there were about 1000+ jobs waiting in line. Please wait and try to run your job again later.
I will try to see the workaround.

@rraymondhp the queues are fine right now, wouldn't it be because the time-out set is too short for the experiment?

Yes, it is because of the timeout=60 in the default notebook. I have just confirmed that by having the timeout=300 or larger, I could run in just fine. @tanweer-ali
Thanks @francabrera !

@rraymondhp  Thankyou for the timeout tip.
That worked!
Now the next section of the code which is supposed to draw the plots
i get the following output:
0.2109375	S
0.1796875	SÊ
<matplotlib.figure.Figure at 0x7faf03915278>

And i don't see any plots

You're welcome @tanweer-ali
This is an issue with permutation of qubit measurements that we are still working to fix.
This is the workaround as noted in my notebook below:
https://github.com/jaygambetta/qiskit-tutorial/blob/rr-quantum-emoticon-nopermutation/hello_world/quantum_emoticon-without_permutation.ipynb
We also had a discussion on the slack channel about this.
https://qiskit.slack.com/archives/C7SJ0PJ5A/p1519833287000006
Sorry for the inconvenience!

@rraymondhp Thank you!
How do i join the slack channel? my email is not signed up for it ?
I am still looking into your other link.

@rraymondhp @rraymondhp This is fixed now in the QISKit master branch, and the next pip release will include the changes. You can close this issue.

Closing this issue. Fixed in https://github.com/QISKit/qiskit-sdk-py/pull/347

#put barrier before measurement
qc.barrier(qr)
measure
for j in range(16):
qc.measure(qr[j], cr[j])
run and get results
results = qp.execute(["smiley_writer"], backend='ibmqx5', shots=1024, timeout=300)
stats = results.get_counts("smiley_writer")
Even after putting barrier before measurement . we are still getting error. please tell solution
Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=MZgk97UyjskiUbqxKJmEPYKB46DDjdyJb0DiQ7gBu2HcP8A17H0Ps1s7I6PNBGzK: {"error":{"status":400,"message":"Generic error","code":"GENERIC_ERROR"}}
Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=MZgk97UyjskiUbqxKJmEPYKB46DDjdyJb0DiQ7gBu2HcP8A17H0Ps1s7I6PNBGzK: {"error":{"status":400,"message":"Generic error","code":"GENERIC_ERROR"}}
Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=MZgk97UyjskiUbqxKJmEPYKB46DDjdyJb0DiQ7gBu2HcP8A17H0Ps1s7I6PNBGzK: {"error":{"status":400,"message":"Generic error","code":"GENERIC_ERROR"}}
Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=MZgk97UyjskiUbqxKJmEPYKB46DDjdyJb0DiQ7gBu2HcP8A17H0Ps1s7I6PNBGzK: {"error":{"status":400,"message":"Generic error","code":"GENERIC_ERROR"}}
Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=MZgk97UyjskiUbqxKJmEPYKB46DDjdyJb0DiQ7gBu2HcP8A17H0Ps1s7I6PNBGzK: {"error":{"status":400,"message":"Generic error","code":"GENERIC_ERROR"}}

Hi @amandeep1988
It's strange because clicking the links (https://...) at your post I can see the counts/outputs of your results. Let me see what is wrong. Have you updated your qiskit to the latest version of 0.5.6?
Please also change your token, as it has been revealed to public by your post.

Dear Sir,
Yes i have already updated qiskit to 0.5.6. Now, i will regenerate the
token n run it again.
On Thu, 12 Jul 2018 5:04 AM Rudy Raymond<EMAIL_ADDRESS>wrote:

Hi @amandeep1988 https://github.com/amandeep1988
It's strange because clicking the links (https://...) at your post I can
see the counts/outputs of your results. Let me see what is wrong. Have you
updated your qiskit to the latest version of 0.5.6?
Please also change your token, as it has been revealed to public by your
post.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Qiskit/qiskit-tutorial/issues/88#issuecomment-404342702,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMWPfRHb0r_9IaJ9HC7sEdhdRP0UMonQks5uFotygaJpZM4RzFoc
.

@rraymondhp
Now, it gives timed out error.
Sometimes it gives Got a 400 code response........... or either timeout error  even after setting timeout to 600.

Hi @amandeep1988
600 secs are too short. please refer to the tutorial below for how to queue without setting timeout.
https://nbviewer.jupyter.org/github/QISKit/qiskit-tutorial/blob/master/hello_world/quantum_world.ipynb

ImportError                               Traceback (most recent call
last) in ()----> 1 from
qiskit.tools.visualization import plot_histogram
~\Anaconda3\lib\site-packages\qiskit\tools\visualization_init_.py
in ()      8 """Main QISKit visualization methods."""      9
---> 10 from ._circuit_visualization import circuit_drawer,
plot_circuit, generate_latex_source,\     11     latex_circuit_drawer,
matplotlib_circuit_drawer, qx_color_scheme     12 from
._state_visualization import plot_state
~\Anaconda3\lib\site-packages\qiskit\tools\visualization_circuit_visualization.py
in ()     33 import numpy as np     34 ---> 35 from PIL import
Image, ImageChops     36      37 from qiskit import QuantumCircuit,
QISKitError, load_qasm_file
~\Anaconda3\lib\site-packages\PIL\Image.py in ()     58     #
Also note that Image.core is not a publicly documented interface,
59     # and should be considered private and subject to change.--->
60     from . import _imaging as core     61     if PILLOW_VERSION !=
getattr(core, 'PILLOW_VERSION', None):     62         raise
ImportError("The _imaging extension was built for another "
ImportError: DLL load failed: The specified module could not be found.
Module not found and cannot execute histogram.
On Thu, Jul 12, 2018 at 10:18 AM, Rudy Raymond<EMAIL_ADDRESS>wrote:

Hi @amandeep1988 https://github.com/amandeep1988
600 secs are too short. please refer to the tutorial below for how to
queue without setting timeout.
https://nbviewer.jupyter.org/github/QISKit/qiskit-tutorial/
blob/master/hello_world/quantum_world.ipynb
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Qiskit/qiskit-tutorial/issues/88#issuecomment-404388228,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMWPfeEL5fomVXyuXGTRGHHGV-E3foFXks5uFtUVgaJpZM4RzFoc
.

--
Thanks & Regards
Amandeep Singh

hi,
my point is to replace the timeout function as below:
'''
lapse = 0
interval = 10
while not job_exp.done:
print('Status @ {} seconds'.format(interval * lapse))
print(job_exp.status)
time.sleep(interval)
lapse += 1
print(job_exp.status
'''
If you don`t need to draw circuits you can just disable the drawer. or use the matplotlib drawer as detailed here:
https://nbviewer.jupyter.org/github/QISKit/qiskit-tutorial/blob/master/reference/tools/matplotlib_circuit_drawer.ipynb

During executing the code on backend ...it keep on checking status and
showing job is actively running and sudden
it coming with
Got a 400 code response to.......
{"error":{"status":400,"message":"Generic
error","code":"GENERIC_ERROR"}}
Can you please tell me the error is on backend side or what it means.?
On Thu, Jul 12, 2018 at 11:08 AM, Rudy Raymond<EMAIL_ADDRESS>wrote:

hi,
my point is to replace the timeout function as below:
'''
lapse = 0
interval = 10
while not job_exp.done:
print('Status @ {} seconds'.format(interval * lapse))
print(job_exp.status)
time.sleep(interval)
lapse += 1
print(job_exp.status
'''
If you don`t need to draw circuits you can just disable the drawer. or use
the matplotlib drawer as detailed here:
https://nbviewer.jupyter.org/github/QISKit/qiskit-tutorial/
blob/master/reference/tools/matplotlib_circuit_drawer.ipynb
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Qiskit/qiskit-tutorial/issues/88#issuecomment-404395146,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMWPfVrVV_dVli70s1s-IDOWzkF36EEUks5uFuDFgaJpZM4RzFoc
.

--
Thanks & Regards
Amandeep Singh

Then it come up with in between
Got a 502 code response to ...... 502 Bad Gateway: Registered endpoint
failed to handle the request.
But job is actively running with increase in time..
On Sun, Jul 22, 2018 at 12:24 PM, aman deep<EMAIL_ADDRESS>wrote:

During executing the code on backend ...it keep on checking status and
showing job is actively running and sudden
it coming with
Got a 400 code response to....... {"error":{"status":400,"message":"Generic error","code":"GENERIC_ERROR"}}
Can you please tell me the error is on backend side or what it means.?
On Thu, Jul 12, 2018 at 11:08 AM, Rudy Raymond<EMAIL_ADDRESS>wrote:

hi,
my point is to replace the timeout function as below:
'''
lapse = 0
interval = 10
while not job_exp.done:
print('Status @ {} seconds'.format(interval * lapse))
print(job_exp.status)
time.sleep(interval)
lapse += 1
print(job_exp.status
'''
If you don`t need to draw circuits you can just disable the drawer. or
use the matplotlib drawer as detailed here:
https://nbviewer.jupyter.org/github/QISKit/qiskit-tutorial/b
lob/master/reference/tools/matplotlib_circuit_drawer.ipynb
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Qiskit/qiskit-tutorial/issues/88#issuecomment-404395146,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMWPfVrVV_dVli70s1s-IDOWzkF36EEUks5uFuDFgaJpZM4RzFoc
.

--
Thanks & Regards
Amandeep Singh

--
Thanks & Regards
Amandeep Singh

I will look into it later and reopen the issue.
Is it possible to have your notebook so I can test it myself?

def lowest_pending_jobs():
"""Returns the backend with lowest pending jobs."""
list_of_backends = available_backends(
{'local': False, 'simulator': False})
device_status = [get_backend(backend).status
for backend in list_of_backends]
best = min([x for x in device_status if x['operational'] is True],
           key=lambda x: x['pending_jobs'])
return best['name']

backend = lowest_pending_jobs()
print("The best backend is " + backend)
Got a 502 code response to
https://quantumexperience.ng.bluemix.net/api/Backends/ibmq_qasm_simulator/queue/status:
502 Bad Gateway: Registered endpoint failed to handle the request.
Got a 400 code response to
https://quantumexperience.ng.bluemix.net/api/Backends/ibmq_qasm_simulator/queue/status:
{"error":{"status":400,"message":"Generic
error","code":"GENERIC_ERROR"}}
And, Finally i have to stop the execution.
On Sun, Jul 22, 2018 at 12:29 PM, Rudy Raymond<EMAIL_ADDRESS>wrote:

I will look into it later and reopen the issue.
Is it possible to have your notebook so I can test it myself?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Qiskit/qiskit-tutorial/issues/88#issuecomment-406845724,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMWPfVExlNq04qZRoD3yhRhcr9od63Qtks5uJCLQgaJpZM4RzFoc
.

--
Thanks & Regards
Amandeep Singh


Removing rewards threshold

getDataBatch function is updated in loans contract.
_calculate_snapshot is updated in positions.py.

This will be a byproduct of continuous rewards implementation. For now it is already lowered to be the same as the liquidation threshold.


Escape special characters

Markdown.jl should escape special characters. Currently I get:
julia> input = """
              `<tag>`
              """
"`<tag>`\n"

julia> output = stringmime("text/html", Markdown.parse(input))
"
\n
<tag>
\n
\n"

which does not work render well browsers. It's fairly easy to fix this for code blocks replacing < with < etc, but if you wan't to support inline HTML in paragraphs then it takes more work.

This is fixed in https://github.com/JuliaLang/julia/pull/10061 (so should be in 0.4 and hopefully the next Markdown.jl release).


FIX-mediasetinfinity.mediaset

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

[X] I'm reporting a broken site
[X] I've verified that I'm running yt-dlp version 2023.01.06 (update instructions) or later (specify commit)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[X] I've read about sharing account credentials and I'm willing to share it if required

Region
Italia
Provide a description that is worded well enough to be understood
Unsupported URL
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
[debug] Command-line config: ['-Uv', '--cookies-from-browser', 'firefox', 'https://mediasetinfinity.mediaset.it/video/isegretidelranchmaledetto2/ep1-la-fossa-di-homestad-two_Y311967901000101']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] ytdl-patched/yt-dlp version 2<IP_ADDRESS>19 [c913e41] (win_exe)
[debug] ** This build is unofficial daily builds, provided for ease of use.
[debug] ** Please do not ask for any support.
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-109429-g8ad988ac37-20221217 (setts), ffprobe N-109429-g8ad988ac37-20221217
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[Cookies] Extracting cookies from firefox
[debug] Extracting cookies from: "C:\Users\House\AppData\Roaming\Mozilla\Firefox\Profiles\5jzz5ux9.default-release\cookies.sqlite"
[Cookies] Extracted 2592 cookies from firefox
[debug] Proxy map: {}
[debug] Loaded 1761 extractors
[debug] Fetching release info: https://api.github.com/repos/ytdl-patched/yt-dlp/releases/latest
Latest version: 2<IP_ADDRESS>19, Current version: 2<IP_ADDRESS>19
yt-dlp is up to date (2<IP_ADDRESS>19)
[generic] Extracting URL: https://mediasetinfinity.mediaset.it/video/isegretidelranchmaledetto2/ep1-la-fossa-di-homestad-two_Y311967901000101
[generic] ep1-la-fossa-di-homestad-two_Y311967901000101: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] ep1-la-fossa-di-homestad-two_Y311967901000101: Extracting information
[debug] Looking for embeds
ERROR: Unsupported URL: https://mediasetinfinity.mediaset.it/video/isegretidelranchmaledetto2/ep1-la-fossa-di-homestad-two_Y311967901000101
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1502, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1578, in __extract_info
  File "yt_dlp\extractor\common.py", line 682, in extract
  File "yt_dlp\extractor\generic.py", line 2523, in _real_extract
yt_dlp.utils.UnsupportedError: Unsupported URL: https://mediasetinfinity.mediaset.it/video/isegretidelranchmaledetto2/ep1-la-fossa-di-homestad-two_Y311967901000101

I think the GUID regex just needs to be adjusted:
diff --git a/yt_dlp/extractor/mediaset.py b/yt_dlp/extractor/mediaset.py
index 1fa529914..a842f1cf0 100644
--- a/yt_dlp/extractor/mediaset.py
+++ b/yt_dlp/extractor/mediaset.py
@@ -15,7 +15,7 @@

 class MediasetIE(ThePlatformBaseIE):
     _TP_TLD = 'eu'
-    _GUID_RE = r'F[0-9A-Z]{15}'
+    _GUID_RE = r'[FY][0-9A-Z]{15}'
     _VALID_URL = rf'''(?x)
                     (?:
                         mediaset:|

I'm geo-blocked though so I can't properly test

It's behind paywall so almost certainly DRM protected, but you are correct, the regex should be charged.

It's behind paywall so almost certainly DRM protected, but you are correct, the regex should be charged.

thanks a lot for your work

It's behind paywall so almost certainly DRM protected

OP's example URL confirmed as DRM-protected

ERROR: [Mediaset] F312603203012702: This content is not available in your location. You might want to use a VPN or a proxy server (with --proxy) to workaround.
Is this error related to the issue in question?

@nicovoni No. It just means the content is geo-restricted


Multi-level discriminated models don't set their discriminators correctly

Problem summary
When defining a discriminated type that extends another discriminated type, the generated constructors for the downstream types don't set the right values, which results in malformed serialization.
Repro
Standalone project:
csharp-emitter-double-discriminator-repro.zip
Example models (from main.tsp):
@discriminator("taxonomic_family")
model Animal {
  taxonomic_family: string;
}

@discriminator("breed")
model Dog extends Animal {
  taxonomic_family: "canidae";
  breed: string;
}

model Labrador extends Dog {
  breed: "labrador";
}

With the above, the public Dog() constructor is an instance of the issue.
More details
From the README included in the above repro .zip:
npm install @azure-tools/typespec-csharp @autorest/csharp --save-dev
npx tsp compile .

Search for and open Dog.cs and observe the generated constructors:
        /// <summary> Initializes a new instance of <see cref="Dog"/>. </summary>
        public Dog()
        {
            Breed = "canidae";
        }

        /// <summary> Initializes a new instance of <see cref="Dog"/>. </summary>
        /// <param name="taxonomicFamily"></param>
        /// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
        /// <param name="breed"></param>
        internal Dog(string taxonomicFamily, IDictionary<string, BinaryData> serializedAdditionalRawData, string breed) : base(taxonomicFamily, serializedAdditionalRawData)
        {
            Breed = breed;
        }

While the internal constructor is correct and properly sets the inner discriminator of Breed to the provided value while invoking the parent type's base constructor to set the outer discriminator of taxonomic_family, the public constructor has multiple issues:

It doesn't invoke the base constructor at all
It doesn't set the outer discriminator of taxonomic_value to any value
It instead sets the inner discriminator (breed) to the intended value of outer discriminator (taxonomic_family)

As a result of this, serialized instances of Dog are very malformed:
{
  "taxonomic_family": null,
  "breed": "canidae"
}

@trrwilson :( unfortunately this is known issue for quite a long time.
Here is another issue tracking this: https://github.com/Azure/autorest.csharp/issues/5146

Yes, the new generator has support for multi-level discriminators.


'Backend error' and loading spinner but no code editor component

I'm seeing a console error and the code editor component is not loading.
The issue persists between Chrome and Safari, and the error message suggests it's a server side issue.

Hi @mfix22 , it was just https://carbon.now.sh – I didn't get redirected to a URL like https://carbon.now.sh/?bg=rgba(171%2C184%2C195%2C0)&t=material&wt=none&l=application%2Fx-sh&ds=true&dsyoff=20px&dsblur=68px&wc=true&wa=false&pv=48px&ph=32px&ln=false&fm=Hack&fs=14px&lh=133%25&si=false&es=2x&wm=false&ts=false
The issue seems to be resolved now, the editor component is loading correctly for me now.

That is weird . . .  I wonder if there was an error that was temporary in our backend server provider? If you think the issue is resolved, please close, and reopen if you notice how to recreate it (:

Happy to close as I can't reproduce it now. Thank you for a brilliant tool, by the way! 👍

Thanks @philwolstenholme 🙏


website on localhost is no longer working

Story
No response
Description
I can no longer run our website on localhost.  I really would like to understand why this is so unstable?
PS C:\Users\iansk\documents\github\website> npm install
added 1 package, removed 3 packages, changed 2 packages, and audited 2703 packages in 14s
304 packages are looking for funding
run npm fund for details
17 vulnerabilities (4 moderate, 12 high, 1 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run npm audit for details.
PS C:\Users\iansk\documents\github\website> npm start

<EMAIL_ADDRESS>start
npm-run-all clean:dev build:js --parallel dev:*

<EMAIL_ADDRESS>clean:dev
cross-env npx del-cli '_site/!(img)' && cross-env npx mkdirp '_site/js'

<EMAIL_ADDRESS>build:js
terser -c -m -o _site/js/cc.min.js node_modules/vanilla-cookieconsent/dist/cookieconsent.js src/js/cookies.js

<EMAIL_ADDRESS>dev:postcss
cross-env TAILWIND_MODE=watch npx postcss ./src/css/style.css -o ./_site/css/style.css --config ./postcss.config.js -w

<EMAIL_ADDRESS>dev:netlify
npx netlify dev

<EMAIL_ADDRESS>dev:docs
node scripts/dirExists ../flowforge/docs && nodemon -w ../flowforge/docs -e md --exec "npm run docs" || echo "docs not found - skipping..."

"docs not found - skipping..."
warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
info - Tailwind CSS is watching for changes...
info - https://tailwindcss.com/docs/just-in-time-mode#watch-mode-and-one-off-builds
◈ Netlify Dev ◈
◈ Using simple static server because '[dev.framework]' was set to '#static'
◈ Running static server from "website_site"
◈ Setting up local development server

Installing plugins

<EMAIL_ADDRESS>
Dependencies installation error
────────────────────────────────────────────────────────────────

Error message
Error while installing dependencies in C:\Users\iansk\Documents\GitHub\website/.netlify/plugins/
npm ERR! code 1
npm ERR! path C:\Users\iansk\Documents\GitHub\website.netlify\plugins\node_modules@algolia\netlify-plugin-crawler
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c [ -d dist/ ] || npm run build
npm ERR! ><EMAIL_ADDRESS>build
npm ERR! > npx tsc -b
npm ERR!
npm ERR!
npm ERR!
npm ERR!                 This is not the tsc command you are looking for
npm ERR!
npm ERR!
npm ERR! To get access to the TypeScript compiler, tsc, from the command line either:
npm ERR!
npm ERR! - Use npm install typescript to first add TypeScript to your project before using npx
npm ERR! - Use yarn to avoid accidentally running code from un-installed packages
npm ERR! '[' is not recognized as an internal or external command,
npm ERR! operable program or batch file.

npm ERR!     C:\Users\iansk\AppData\Local\npm-cache_logs\2023-04-19T19_41_46_403Z-debug-0.log

Resolved config
build:
command: npm run build
commandOrigin: config
edge_functions: C:\Users\iansk\Documents\GitHub\website\netlify\edge-functions
publish: C:\Users\iansk\Documents\GitHub\website_site
publishOrigin: config
plugins:
- inputs: {}
origin: config
package: '@algolia/netlify-plugin-crawler'
»   Error: Could not start local development server

Error while installing dependencies in C:\Users\iansk\Documents\GitHub\website/.netlify/plugins/
npm ERR! code 1
npm ERR! path C:\Users\iansk\Documents\GitHub\website.netlify\plugins\node_modules@algolia\netlify-plugin-crawler
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c [ -d dist/ ] || npm run build
npm ERR! ><EMAIL_ADDRESS>build
npm ERR! > npx tsc -b
npm ERR!
npm ERR!
npm ERR!
npm ERR!                 This is not the tsc command you are looking for
npm ERR!
npm ERR!
npm ERR! To get access to the TypeScript compiler, tsc, from the command line either:
npm ERR!
npm ERR! - Use npm install typescript to first add TypeScript to your project before using npx
npm ERR! - Use yarn to avoid accidentally running code from un-installed packages
npm ERR! '[' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR!     C:\Users\iansk\AppData\Local\npm-cache_logs\2023-04-19T19_41_46_403Z-debug-0.log
Error: Error while installing dependencies in C:\Users\iansk\Documents\GitHub\website/.netlify/plugins/
npm ERR! code 1
npm ERR! path C:\Users\iansk\Documents\GitHub\website.netlify\plugins\node_modules@algolia\netlify-plugin-crawler
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c [ -d dist/ ] || npm run build
npm ERR! ><EMAIL_ADDRESS>build
npm ERR! > npx tsc -b
npm ERR!
npm ERR!
npm ERR!
npm ERR!                 This is not the tsc command you are looking for
npm ERR!
npm ERR!
npm ERR! To get access to the TypeScript compiler, tsc, from the command line either:
npm ERR!
npm ERR! - Use npm install typescript to first add TypeScript to your project before using npx
npm ERR! - Use yarn to avoid accidentally running code from un-installed packages
npm ERR! '[' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR!     C:\Users\iansk\AppData\Local\npm-cache_logs\2023-04-19T19_41_46_403Z-debug-0.log
at runCommand (file:///C:/Users/iansk/Documents/GitHub/website/node_modules/netlify-cli/node_modules/@netlify/build/lib/install/main.js:20:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async installMissingPlugins (file:///C:/Users/iansk/Documents/GitHub/website/node_modules/netlify-cli/node_modules/@netlify/build/lib/install/missing.js:16:5)
at async handleMissingPlugins (file:///C:/Users/iansk/Documents/GitHub/website/node_modules/netlify-cli/node_modules/@netlify/build/lib/plugins/resolve.js:97:5)
at async resolvePluginsPath (file:///C:/Users/iansk/Documents/GitHub/website/node_modules/netlify-cli/node_modules/@netlify/build/lib/plugins/resolve.js:32:29)
at async tGetPluginsOptions (file:///C:/Users/iansk/Documents/GitHub/website/node_modules/netlify-cli/node_modules/@netlify/build/lib/plugins/options.js:12:29)
at async tGetPluginsOptions (file:///C:/Users/iansk/Documents/GitHub/website/node_modules/netlify-cli/node_modules/@netlify/build/lib/time/main.js:18:63)
at async initAndRunBuild (file:///C:/Users/iansk/Documents/GitHub/website/node_modules/netlify-cli/node_modules/@netlify/build/lib/core/build.js:243:66)
at async runAndReportBuild (file:///C:/Users/iansk/Documents/GitHub/website/node_modules/netlify-cli/node_modules/@netlify/build/lib/core/build.js:145:165)
at async tExecBuild (file:///C:/Users/iansk/Documents/GitHub/website/node_modules/netlify-cli/node_modules/@netlify/build/lib/core/build.js:92:136)
ERROR: "dev:netlify" exited with 1.
PS C:\Users\iansk\documents\github\website>

When I run locally, (after a git pull and npm install to make sure I've got everything up to date), I don't get the Installing plugins log message that you do (and thus no error around installing the plugins that you hit).
I'm not familiar with the netlify configuration to know what is expected here. Will need @joepavitt to look at this, otherwise I'll dig into it in the morning.

In the error message there is a problem with the install path:
C:\Users\iansk\Documents\GitHub\website.netlify\plugins\node_modules@algolia\netlify-plugin-crawler

Notice the missing \ after node_modules. I noticed this last time on the other issue raised too (can't link now as on phone).
My guess is this is a Windows issue, as nobody else seems to hit these problems, but it's not like an npm install command is a rare thing to run, millions of people will run it on Windows, so not sure I understand what could be causing this problem.
Will investigate in more detail tomorrow

Looking at this on my laptop now, it's trying to run an npx command - I suspect it's working for the devs as npx is a fairly standard thing to have installed, but unlikely on Ian's machine. Although actually, we use npx ourselves just to run the website, so it shouldn't be that.
Other bits that would be useful too if you wouldn't mind @iskerrett, can run run the following commands in the terminal and let me know the responses you see please:
npm -v

node -v

npx netlify -v

I add thing is sometimes it works, sometimes it doesn't work. When it doesn't work the error messages seems to be different.
Here is what I get:
PS C:\Users\iansk\documents\github> cd website
PS C:\Users\iansk\documents\github\website> npm -v
9.3.1
PS C:\Users\iansk\documents\github\website> node -v
v18.14.0
PS C:\Users\iansk\documents\github\website> npm netlify -v
9.3.1
PS C:\Users\iansk\documents\github\website>

npx netlify -v not npm netlify -v please

Here is what I get: netlify-cli/13.2.2 win32-x64 node-v18.14.0

Thanks Ian, version numbers all as I would expect them to be. I'm firing up my Windows machine and installing git, node, etc. into it to try this out there too. Will update once I've made progress

OK, thanks. I won't be online for much longer so we can work on this together tomorrow morning.

confirmed - can reproduce on my windows machine with a fresh install

as a temporary (and by no means ideal) workaround, you can remove:
[[plugins]]
package = "@algolia/netlify-plugin-crawler"
  [plugins.inputs]
  branches = ['main', 'live']
  template = "hierarchical"

from our netlify.toml file and it will run successfully (verified on my own machine)

okay, much better workaround found, and a potential fix from reading these docs.
Seems as though, for some reason on Mac, we do not need to manually add the plugin to our own package.json, but for Windows we do (not documented), but I can confirm that running
npm install -D @algolia/netlify-plugin-crawler

then running:
npm start

does run successfully on Windows. Will open a PR with the fix.


link from events not working

https://nf-co.re/events refers to https://github.com/nf-core/nf-co.re/blob/master/nf-core-events.yaml
for modification

A bit difficult where this page should actually point to. Maybe https://github.com/nf-core/nf-co.re/tree/master/markdown/events?

Ah yeah, the YAML file is how it used to work. Pointing to that directory would be best I think @mashehu 👍🏻


store layer in URL and pick locale for initial state

This should fix #118

This looks good. Although it would result in a conflict with https://github.com/graphhopper/graphhopper-maps/pull/125. I'd rather merge 125 before this one and add the layer information to the new NavBar class

Sure :+1:

Merging it, since the #125 is merged and I resolved the conflicts


If an agent calls a function before synthesizing audio, it gets stuck in an infinite loop

If the agent calls a function before it has synthesized any audio, it gets stuck in an infinite loop.
https://github.com/livekit/agents/blob/1802d3466f8b56e1ec16f1bfc9f75f7960ed62cc/livekit-agents/livekit/agents/pipeline/pipeline_agent.py#L638
This future never resolves.
The easiest way to reproduce is to create an agent that can call functions, and open with a question that causes a function call before the agent's response.
A workaround for this is to make the agent play some empty audio before.

It also seems to get stuck if you return False from the before_llm_cb - I worked around that by just creating a fake and empty LLM stream.

It appears that https://github.com/livekit/agents/blob/1802d3466f8b56e1ec16f1bfc9f75f7960ed62cc/livekit-agents/livekit/agents/pipeline/agent_playout.py#L150 never returns if there are no frames


Rewrite Revolution

This code is a bit bad all around, so probably improve it some time.

That should do it.


Order bin list

Bin list doesn't have any ordering by now, expect the order of addition which bugs when the list is split into 2 lines.

Bins are now ordered by position.
Closed by https://github.com/anthill/6bin/commit/f07212406d83ce96629a2ecd41f81cfa98e651c8


add 2d image similar to presentation last week

2d heatmap type visualization with variable dimension choices.

Do after completing in progress tasks


Remove pattern from document selector

Motivation
Closes #1349
In https://github.com/Shopify/vscode-ruby-lsp/pull/986, we ended up making a mistake using path.join for the document selector pattern. In Windows, that's going to result in workspace\**\* (using backslashes), which doesn't get recognized properly.
Implementation
I took another look at it and there's no reason why we actually need the pattern. We want to handle all Ruby files, so we can just remove it.
This is the same that Rust Analyzer does.
Manual Tests

Start the extension on this branch
Open any file and try to go to the definition of a constant
Verify you can do that inside the workspace
Jump to the source code of a gem
Verify you can also go to definitions inside the gem's source code

Question: Does this mean that if I open a Ruby file that doesn't belong to the current project in the editor and save it, it will also be formatted using the formatting rules of my project?

It won't because we skip running formatting for files that are outside the workspace. Same thing for diagnostics.
You get all other features though.


JAMES-4077 Renaming LuceneMemorySearchHighlighter -> LuceneSearchHighlighter & add new Lucene File system test

The LuceneMemorySearchHighlighter only use lucene highlight api, it's nothing special just for memory.

Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.3.0:check (check-style) on project apache-james-mailbox-tika: You have 1 Checkstyle violation.

weird, "tika", I didn't change anything to that module
I just rebuilt locally, and it was successful.

@Arsnael can you help merge this one to fix the master build: https://github.com/apache/james-project/pull/2440

The tika PR was merged while no build was done (it seems there was some issues with the ci yesterday, didnt look very stable)
We should be more careful when merging things

rebase master

Can rebase


handleKeys 'numeric' doesn't include numpad numbers on Windows.

Added support in 1.3.2

I just updated to 1.3.2, numpad still does not function for me.  Top row numbers work, but numpad does not send a value.  Using Ubuntu.
Code:
	<KeyboardEventHandler handleKeys={['1', '2', '3','4','5','6','7','8']} onKeyEvent={(key, e) => 							this.handleOptionKeyPress2(key) }

yeah the issue being it's checking keyCode 48-57 which is the number keys at the top of the keyboard, the numpad keys are 96-105, reference table in top right of page: https://keycode.info/

@kishorenaib  Are you sure you you have the new version ? could you try the demo page ? https://linsight.github.io/react-keyboard-event-handler/demo/dist/index.html

Sweet! Thanks for the quick fix!

No worries. Closing as resolved.


Optional LR visualization

Adds ability to display horizontal line with custom LR. Handy when you want to select best LR.

LGTM, thanks!


fix/service: fix endian issue in generating network name

This uses the new big_endian_sip_hash from maidsafe_utilities to ensure all peers generate the
same name regardless of their endianness.  This also reduces the error message passed when
connect() fails.

This change is

r? @canndrew
(maidsafe_highfive has picked a reviewer for you, use r? to override)

r? @afck

Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.

Comments from Reviewable


Add method to get sleep series

Add method to get sleep series

Codecov Report

Merging #30 (05fa81a) into main (00c8dcc) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #30   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            7         7
  Lines          359       404   +45
  Branches        39        47    +8
=========================================
+ Hits           359       404   +45

Files Changed
Coverage Δ

src/aiowithings/models.py
100.00% <100.00%> (ø)

src/aiowithings/withings.py
100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Localizable.string breaks application localization

Hi. Your library is awesome. But I'v found a problem, when you installs this library by CocoaPods, you add Localizable.string to the root of application bundle.
If your application have several languages in the bundle, application can't find their own Localizable.string file.

Hey mate -- apologies for the issues you're seeing.
tl;dr - I've updated QRCode to version 16.1.0 which removes its own internal localisations. If you update your podfile to 16.1.0 hopefully this should solve your issue.
longer: Given that QRCode currently only supports English localization, it's easier to remove the localizations from QRCode than to try to get localizations working between SPM and CocoaPods.  I moved the QRCode podspec to use resource_bundle instead of resources BUT while that fixed the app's localizations I struggled to get QRCode localizations to work!
Anyway, if you could update and try the updated library and let me know if it solve your issue that'd be great!

Note that it takes a while for the 16.1.0 to become available via cocoapods (it's still not publicly available here yet) but hopefully within the next hour or so it'll be available
From the cocoapods email :-

A new version of DSF_QRCode was released with version 16.1.0 by<EMAIL_ADDRESS>https://github.com/CocoaPods/Specs/commit/9f0a724b47a046ebfac6214fbf03d777ba9f3766

Closing assuming that bug was fixed.


Invoice Canister Cleanup Tasks

[x] Ensure that person without viewing permission cannot view an already verified invoice

invoice.mo line 283

[x] Gitignore src/declarations
[x] replace dfx stop with `#!/usr/bin/env bash;  set -e; dfx stop
[ ] Add access control for creating new invoices
[x] Check account for transfer fee during transfer

ICPLedger.mo line 179

[x] pull magic numbers into constants

main.mo line 139

[ ] Refactor permission checks to a method

Is it possible to uncheck " Check account for transfer fee during transfer " ?
The current logic doesn't actually fix this problem--the way to resolve it is require a minimum payable amount for creating invoices (if the token is ICP or ICRC-1). Since an invoice requires at least one transfer by the invoice canister that the payable amount must cover (from invoice subaccount to principal subaccount), I'd suggest the minimum to be twice the transfer fee.
Somewhat similar to this issue, https://github.com/dfinity/invoice-canister/issues/35, I'd like to fix both in future commits as part of the bounty since otherwise this current pull request is ready to go (uploading it soon).

More of a general question, but couldn't all the specific result return types anonymously declared in the function itself be moved into its own module (or extended as a part of the Types)? This would make the invoice canister's code much more concise, which presumably would make it easier to grok or iterate development unless there's a reason it should be styled the way it is?


Using jQuery listener on events fired from Prototype on document.

Hi!
Thanks for this script! it works great when used on elements, however if using document.fire("custom:event") then I am unable to catch this event with jQuery:
jQuery(document).on("custom:event", function() {
  console.log("got it");
});

document.fire("custom:event");

The above will not work. I also noticed that the test for this case is missing, is this on purpose because it's something that's not possible?
Thanks for your help.

You're right, this is a gap in the bridge, an unintended one.
Prototype has special code for the fire function that is adds to the Document interface. I think the problem may be solved simply by adding the following to the end of the bridge code:
Object.extend(document, {
   fire: function(eventName, memo) {
      if (eventName.indexOf(':') > 0) {
         oldjQueryTrigger(eventName, memo ? [memo] : null, document);
      }
      oldPrototypeFire(document, eventName, memo);
    }
});

If this works and all tests are passing, I'll look to update the library.

Fixed in 1.0.2, just pushed to npm as well.


Show warning message for unsaved changes before navigating to another page

Ref
Block and Page need to both be Saved in Order to save a Block change only section -
TODO

[x] detect if a block has been updated in page builder (compare current and previous object) and "save" btn was pressed
[x] add the warning message
[x] prevent the route update / route param update upon pressing "cancel"
[x] keep block changes upon pressing "cancel"
[x] update route / route params upon pressing "ok"

Changelog
What was changed?
When working with Compose page blocks, it is a common situation when the user edits, adds or deletes a block. Currently, to save a block, the user has to first save the block and then save the page with the updated block. The problem comes from the fact that sometimes the user may forgot to save the page and then wonder why his changes has not been implemented. To counter this, a notification message has been added, that detects if the user has updated but not yet saved the page. Moreover, for better UI, a warning icon appears on each block that has been updated. This gently reminds the user that there are unsaved changes and he can revert this changes by pressing the cancel button on the confirmation popup that is triggered before leaving the page.
How was changed?
Why was changed?

Tested and confirming that this works as expected. Also the CL entry has been added. Moving the ticket to Done.


Stats / Ranks

stats(id, type, typeID, kills, losses, pointKills, pointLosses, iskKills, iskLosses, rank)
type being character, corporation, alliance, faction, system etc etc.
type ID being the ID for the type in question.
Ranks are calculated by type. ie. Characters are ranked against Characters, Corporations against Corporations, etc. only.
No global rankins (Corps vs Characters) as in zKB, it's overly time consuming and highly irrelevant.
Ranks are calculated based on kills/losses ratio, point ratio and isk ratio. (Equation to be determined)

(((kills / losses) / 100) / ((iskKilled / iskLost) / 100) * ((pointsKilled / pointsLost) * 100))
Examples:
(((16/56) / 100) / ((1141846183.58 /<PHONE_NUMBER>.34) / 100) * ((1715 / 3196) * 100))
= 44.510162959727620825880898627767493496298062055541733...
(((7185 / 685) / 100) / ((921561244418.72 /<PHONE_NUMBER>52.86) / 100) * ((369851 / 113297) * 100))
=<PHONE_NUMBER>9282218462893271185390066364211188606352288...


Refactor NotificationListener interface

Currently it is tightly coupled to PacktFreeOffer.
Instead of creating another different NotificationListener for the new weekly data, we could make the listener to be templated, and instantiate subclasses as a specific subtemplate type.
This is closely related to #53 (Refactor EmailService).

Won't be done for now.


[AAP-14635] Correct worker class name in deployment script

This PR contains:

added the missing change for worker class name in the deployment script, so OCP worker pod can start;
added the missing container eda-activation-worker;
rename eda-worker to eda-default-worker

Solves: AAP-14635

@hsong-rh Don't we need role bindings and service account for the activation-worker? From what I recall those role bindings and service accounts were needed to start activations in k8s env

Good catch! @mkanoor, we need it for new worker.

@mkanoor @Alex-Izquierdo Now activation-worker has role binding and service accounts, it will handle activation tasks. default-worker doesn't need roles and service account.

@hsong-rh I think both workers need it. Deactivate rulesets is executed in the default worker. And we expect that the default worker might do other tasks (scheduled tasks like monitor activations)

@hsong-rh I think both workers need it. Deactivate rulesets is executed in the default worker. And we expect that the default worker might do other tasks (scheduled tasks like monitor activations)

OK, make sense, added them


Error while reading sklearn-onnx model

I am testing out the onnxruntime library.  I have a very simple model built in Python using sklearn and I save it in the onnx format using skl2onnx library.
python code:
from sklearn.model_selection import train_test_split
from sklearn.datasets import load_digits
from sklearn.linear_model import LogisticRegression
from skl2onnx.common.data_types import FloatTensorType
from skl2onnx import convert_sklearn, get_model_alias

digits = load_digits()
x_train, x_test, y_train, y_test = train_test_split(
    digits.data, digits.target, test_size=0.2, random_state=2)
clf = LogisticRegression()
initial_type = [('input', FloatTensorType([None, 64]))]

onx = convert_sklearn(clf, initial_types=initial_type, target_opset=11)
with open("simple_model.onnx", "wb") as f:
    f.write(onx.SerializeToString()

and I read the model in rust
    let environment = environment::Environment::builder()
        .with_name("trial")
        .with_log_level(onnxruntime::LoggingLevel::Verbose)
        .build()?;

    let _session = environment
        .new_session_builder()?
        .with_optimization_level(onnxruntime::GraphOptimizationLevel::Basic)?
        .with_model_from_file("simple_model.onnx")?

I get the following error while building the session in rust:
thread 'main' panicked at 'assertion failed: (left != right)  left:0x0,  right: 0x0', /home/vikram/.cargo/registry/src/github.com-1ecc6299db9ec823/onnxruntime-0.0.12/src/session.rs:690:9 note: run with RUST_BACKTRACE=1environment variable to display a backtrace
What am I doing wrong? Any help is greatly appreciated!

Running into the same error. Were you able to find any solutions @Vikramardham ?
Is sklearn ported model not supported ?

I'm running into a similar issue when trying to load a basic model converted with skl2onnx.
I started investigating and it seems that the error comes from the "deserialization" of the outputs of the model. Sounds like a type casting issue or something similar.
Has anyone found a solution? I'll follow my researchs and post again if I find a workaround.

@tlegrave This is beautiful. Works for me. Thanks a lot!


dev: implementing semantic-release workflow

Making changes to workflow / actions config requires changes be on the default branch before GH will use them, and that the semantic-release stream is an almost-total-refactor of our CI/test setup, I'm currently working against a mirror of pepr in my personal repo / npm group here:  https://github.com/btlghrants/pepr-semrel / https://www.npmjs.com/settings/btlghrants/packages
Once we're sure that actions trigger / semantic-release versions properly, we'll migrate the working config back over to the Pepr repo.  When migrating back over, be sure to:

cut a release of pepr that is v1.y.z or greater (so semrel will work!)
tag the pepr repo w/ the appropriate version tag (so that semrel will know where to start with version incrementing) a la: https://semantic-release.gitbook.io/semantic-release/usage/configuration#existing-version-tags
Update pepr version in excellent-examples to be ^1.0.0

on hold for now but is a WIP. We will circle back when we can


chore: use terraform_data resource to stabilize test selections

Occasionally, we see metro or facility selections change as a result of capacity changes on the Metal platform side; for example, step 1 of a test deploys to da, but when step 2 runs, there are no longer any available servers in da, so a different metro is selected and the test generates an unexpected plan.

Codecov Report
Attention: 184 lines in your changes are missing coverage. Please review.

Comparison is base (872618d) 59.56% compared to head (ebb6cce) 52.99%.
Report is 16 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #398      +/-   ##
==========================================
- Coverage   59.56%   52.99%   -6.58%
==========================================
  Files          98       99       +1
  Lines       19754    19889     +135
==========================================
- Hits        11767    10540    -1227
- Misses       7684     9162    +1478
+ Partials      303      187     -116

Files
Coverage Δ

equinix/data_source_metal_port.go
100.00% <100.00%> (ø)

equinix/provider.go
82.14% <100.00%> (+0.05%)
:arrow_up:

equinix/resource_metal_vrf.go
86.40% <100.00%> (-0.53%)
:arrow_down:

equinix/data_source_metal_spot_market_request.go
61.61% <50.00%> (-22.23%)
:arrow_down:

equinix/data_source_metal_vrf.go
89.58% <33.33%> (ø)

equinix/resource_metal_port.go
48.73% <47.05%> (-39.48%)
:arrow_down:

equinix/resource_metal_spot_market_request.go
9.55% <30.76%> (-48.13%)
:arrow_down:

equinix/data_source_metal_device_bgp_neighbors.go
71.09% <5.88%> (ø)

equinix/port_helpers.go
0.00% <0.00%> (-72.70%)
:arrow_down:

equinix/data_source_metal_devices.go
49.33% <49.33%> (ø)

... and 1 more

... and 14 files with indirect coverage changes

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


[BUG] OnClick action from DeleteButton should not trigger confirmation pop up, when disabled property is set

Describe the bug
When setting disabled property on DeleteButton component from refine, although styling reflecting a disabled button, the click action is possible. It shows a confirmation modal.
Steps To Reproduce
1- Go to this sample
2- On tableColumns whose dataIndex="actions" add the following    as sibbling of EditButton

3- See that the delete button look and feel changed (from active delete button to a disabled one)
4- Click on the delete button
5- See that a confirm delete modal is shown

Expected behavior
Disabled property should prevent the confirmation modal to be shown.
Screenshot
No response
Desktop
No response
Mobile
No response
Additional Context
No response

Hey @joanaavelar, sorry for the issue 🙏 Looks like a regression, we had this issue in some earlier versions but had it fixed. Probably missed something during the Ant Design version bump 🤦 We'll check the issue and deploy a fix soon 🚀 Just to make sure, which version of @pankod/refine-antd you're using?

Hi @aliemir , the sample that I've shared on the bug is from the refine examples section.
Please see the versions on the below image:

Just identified the issue and resolved in my local tests. Opened up a PR here https://github.com/refinedev/refine/pull/3606
It will be merged and released soon, sorry again for the issue 🙏

no problem. Thanks for the quick reply and fix :)


Basic auth support?

Great CLI! Does it include basic auth support? I see no references to it in the repo.

You should can set it in the KAFKA_CONNECT_REST variable.
export KAFKA_CONNECT_REST="http://myserver:myport"

Indeed, this is good enough for my purposes, thanks! Although with more complex passwords including special characters I suspect this will not work.

You should can set it in the KAFKA_CONNECT_REST variable.
export KAFKA_CONNECT_REST="http://myserver:myport"
I don't think passing basic auth in the url works with the current implementation.

@muscovitebob, can you confirm it?

I am not very happy about the implementation, but it should do the job: https://github.com/lensesio/kafka-connect-tools/pull/37

I am having a bit of an issue with building the project to test it. I've obtained Gradle 5 and am following the readme. From the project dir I do:
gradle-5.6.4/bin/gradle buildCli

Which returns:
> Task :test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> Could not find matching constructor for: org.gradle.process.internal.DefaultExecActionFactory(org.gradle.api.internal.file.BaseDirFileResolver)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Does this look familiar?

I had a similar issue. I reckon it's related to gradle version and incompatibility of some plugin, most likely scalatest gradle plugin. Try using the gradlew wrapper.
./gradlew clean buildCli

Thanks, that helped. Testing against my Kafka Connect cluster, which is HTTPs and secured with BasicAuth. I have the following format of env variable:
export KAFKA_CONNECT_REST='https://USERNAME:ALPHANUMERICPASSWORD@HOSTNAME:PORT'

Then running:
./gradlew clean buildCli
bin/connect-cli ps

Yields:
java.lang.Exception:  Error: the Kafka Connect API returned status code 401
	at com.datamountaineer.connect.tools.RestKafkaConnectApi.non2xxException(RestKafkaConnectApi.scala:124)
	at com.datamountaineer.connect.tools.RestKafkaConnectApi.com$datamountaineer$connect$tools$RestKafkaConnectApi$$req(RestKafkaConnectApi.scala:141)
	at com.datamountaineer.connect.tools.RestKafkaConnectApi$$anonfun$activeConnectorNames$1.apply(RestKafkaConnectApi.scala:153)
	at com.datamountaineer.connect.tools.RestKafkaConnectApi$$anonfun$activeConnectorNames$1.apply(RestKafkaConnectApi.scala:152)
	at scala.util.Try$.apply(Try.scala:192)
	at com.datamountaineer.connect.tools.RestKafkaConnectApi.activeConnectorNames(RestKafkaConnectApi.scala:152)
	at com.datamountaineer.connect.tools.ExecuteCommand$.apply(Cli.scala:66)
	at com.datamountaineer.connect.tools.Cli$.main(Cli.scala:209)
	at com.datamountaineer.connect.tools.Cli.main(Cli.scala)

And to make sure it is not an issue with the bash variable, running:
curl -X GET {$KAFKA_CONNECT_REST}

Indeed returns information about my Kafka Connect cluster.
So it appears that some logic in current master is stripping the credentials info out of the URL string.

I suggested a quick fix here: https://github.com/lensesio/kafka-connect-tools/pull/37
You can try to apply it or build from my fork https://github.com/andreybratus/kafka-connect-tools/tree/feature/basic-auth

Checked out the fork/branch and can confirm that at least with ps it works. I will test the other commands later but looking at the code as the request method is used in all the methods I do not anticipate any issues. Thanks @andreybratus ! Might still be an issue if the password includes : however.


Improved debugger experience for BytesRef

Improved debugger experience for BytesRef.  In addition to the decimal bytes values it now shows the BytesRef as a Utf8String.  If the BytesRef is not a Utf8 string that representation will just be gibberish.

This should be all ready to go.  When I submitted this initially in a new branch I forgot to including the necessary using statement which is why it failed all the tests.  But I added that in the 2nd commit so it's all happy now.  (I realized my mistake about .5 seconds after I submitted the PR. Dooh!)  Anyway, all is well that ends well...right?


Playbook failing.. getting KeyError inventory_mode

Describe the bug
I have created a simple playbook that points to the role dj-wasabi.zabbix-agent, which is installed by AWX on the flight.
The playbook has worked earlier (two days ago) and not it doesn't work anymore.
I receive following issue, when running the playbook on my ansible server (towards every host).
The full traceback is:
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1581276878.3630567-39338606433038/AnsiballZ_zabbix_host.py", line 114, in <module>
    _ansiballz_main()
  File "/root/.ansible/tmp/ansible-tmp-1581276878.3630567-39338606433038/AnsiballZ_zabbix_host.py", line 106, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/root/.ansible/tmp/ansible-tmp-1581276878.3630567-39338606433038/AnsiballZ_zabbix_host.py", line 49, in invoke_module
    imp.load_module('__main__', mod, module, MOD_DESC)
  File "/usr/lib64/python3.6/imp.py", line 235, in load_module
    return load_source(name, filename, file)
  File "/usr/lib64/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/tmp/ansible_zabbix_host_payload_k4lj4ckw/__main__.py", line 857, in <module>
  File "/tmp/ansible_zabbix_host_payload_k4lj4ckw/__main__.py", line 817, in main
  File "/tmp/ansible_zabbix_host_payload_k4lj4ckw/__main__.py", line 502, in check_all_properties
KeyError: 'inventory_mode'
fatal: [psg1-lobbymirror-001.home -> localhost]: FAILED! => {
    "attempts": 3,
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1581276878.3630567-39338606433038/AnsiballZ_zabbix_host.py\", line 114, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1581276878.3630567-39338606433038/AnsiballZ_zabbix_host.py\", line 106, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1581276878.3630567-39338606433038/AnsiballZ_zabbix_host.py\", line 49, in invoke_module\n    imp.load_module('__main__', mod, module, MOD_DESC)\n  File \"/usr/lib64/python3.6/imp.py\", line 235, in load_module\n    return load_source(name, filename, file)\n  File \"/usr/lib64/python3.6/imp.py\", line 170, in load_source\n    module = _exec(spec, sys.modules[name])\n  File \"<frozen importlib._bootstrap>\", line 618, in _exec\n  File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n  File \"/tmp/ansible_zabbix_host_payload_k4lj4ckw/__main__.py\", line 857, in <module>\n  File \"/tmp/ansible_zabbix_host_payload_k4lj4ckw/__main__.py\", line 817, in main\n  File \"/tmp/ansible_zabbix_host_payload_k4lj4ckw/__main__.py\", line 502, in check_all_properties\nKeyError: 'inventory_mode'\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

Installation method/version
I used this guide from the start: https://www.linuxtechi.com/install-ansible-awx-docker-compose-centos-8/
So basically running Ansible AWX inside docker on CentOS 8.
My roles requirements file in my playbook:
bash-4.4# cat roles/requirements.yml
---
- src: https://github.com/dj-wasabi/ansible-zabbix-agent
  version: master
  name: dj-wasabi.zabbix-agent

Github using latest/master

Ansible Version
bash-4.4# ansible --version
ansible 2.8.5
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Oct  7 2019, 17:58:22) [GCC 8.2.1 20180905 (Red Hat 8.2.1-3)]

Targetted hosts
Concerns the following OS(es):

CentOS

Expected behavior
That it should not fail.
Additional context
These are the vars that are on the group all.
zabbix_agent_firewalld_enable: true
zabbix_agent_server: 10.0.1.XXX
zabbix_agent_serveractive: 10.0.1.XXX
zabbix_api_create_hosts: true
zabbix_api_create_hostgroup: true
zabbix_api_use: true
zabbix_api_user: YYY
zabbix_api_pass: ZZZ
zabbix_useuip: 1
zabbix_host_groups:
  - "Linux servers"
zabbix_link_templates:
  - "Template OS Linux by Zabbix agent"
zabbix_url: 'http://10.0.1.XXX'
zabbix_selinux: true

I think this could be related to following.. https://github.com/ansible/ansible/issues/65304

Hi @tobiasehlert Have you tried using a newer version of Ansible to solve this issue?

Hi @dj-wasabi,
I've upgraded to following version:
ansible 2.9.5
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/tobias/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Nov 21 2019, 19:31:34) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)]

Here is the latest stack trace on this..
The full traceback is:
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1583395986.5052142-98721871607287/AnsiballZ_zabbix_host.py", line 114, in <module>
    _ansiballz_main()
  File "/root/.ansible/tmp/ansible-tmp-1583395986.5052142-98721871607287/AnsiballZ_zabbix_host.py", line 106, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/root/.ansible/tmp/ansible-tmp-1583395986.5052142-98721871607287/AnsiballZ_zabbix_host.py", line 49, in invoke_module
    imp.load_module('__main__', mod, module, MOD_DESC)
  File "/usr/lib64/python3.6/imp.py", line 235, in load_module
    return load_source(name, filename, file)
  File "/usr/lib64/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/tmp/ansible_zabbix_host_payload_bm7p5trw/__main__.py", line 857, in <module>
  File "/tmp/ansible_zabbix_host_payload_bm7p5trw/__main__.py", line 817, in main
  File "/tmp/ansible_zabbix_host_payload_bm7p5trw/__main__.py", line 502, in check_all_properties
KeyError: 'inventory_mode'
fatal: [psg1-lobbymirror-001.home -> localhost]: FAILED! => {
    "attempts": 3,
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1583395986.5052142-98721871607287/AnsiballZ_zabbix_host.py\", line 114, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1583395986.5052142-98721871607287/AnsiballZ_zabbix_host.py\", line 106, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1583395986.5052142-98721871607287/AnsiballZ_zabbix_host.py\", line 49, in invoke_module\n    imp.load_module('__main__', mod, module, MOD_DESC)\n  File \"/usr/lib64/python3.6/imp.py\", line 235, in load_module\n    return load_source(name, filename, file)\n  File \"/usr/lib64/python3.6/imp.py\", line 170, in load_source\n    module = _exec(spec, sys.modules[name])\n  File \"<frozen importlib._bootstrap>\", line 618, in _exec\n  File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n  File \"/tmp/ansible_zabbix_host_payload_bm7p5trw/__main__.py\", line 857, in <module>\n  File \"/tmp/ansible_zabbix_host_payload_bm7p5trw/__main__.py\", line 817, in main\n  File \"/tmp/ansible_zabbix_host_payload_bm7p5trw/__main__.py\", line 502, in check_all_properties\nKeyError: 'inventory_mode'\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

Hi @tobiasehlert
Then we probably need to create an issue on the Ansible project for this. Which module is screaming with this stacktrace? (zabbix_host?)

Hi @dj-wasabi
It's the zabbix_host module that is not happy and returns the stacktrace. :)

Create issue at Ansible: https://github.com/ansible/ansible/issues/68088

Hi @tobiasehlert
Can you take a look at PR https://github.com/ansible/ansible/pull/66860 and see if this change works for you?

Hi @dj-wasabi,
I just install the application using DNF on CentOS.. how am I supposed to install the correct patched version?

Hi @dj-wasabi,
I just install the application using DNF on CentOS.. how am I supposed to install the correct patched version?

I was having the same problem. Downloaded the zabbix_host module from here. Put it in ~/.local/lib/python2.7/site-packages/ansible/modules/monitoring/zabbix/, but that may be something like /usr/local/lib/python2.7/dist-packages/ansible/modules/monitoring/zabbix, depends on your setup. Removed zabbix_host.pyc and executed python -m compileall . in the containing directory. Ran the playbook again and it worked.
I'm using ansible version 2.9.6.

Hi @tobiasehlert
What I do, is configure the library in the ansible.cfg file: https://docs.ansible.com/ansible/2.4/intro_configuration.html#library
I manually copy the patched file from github into this directory and run the role.

Hi @dj-wasabi,
I've downloaded the zabbix_host.py file from https://raw.githubusercontent.com/ansible/ansible/9110fa9ea7311f0a67cfe3e2794c7e238213a369/lib/ansible/modules/monitoring/zabbix/zabbix_host.py and placed it in /usr/lib/python3.6/site-packages/ansible/modules/monitoring/zabbix
After that I run python -m compileall . just as @frock81 did it, and then I re-run my playbook with the role and I still receive the stack-trace..
The full traceback is:
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1584998644.2186158-197239467383549/AnsiballZ_zabbix_host.py", line 114, in <module>
    _ansiballz_main()
  File "/root/.ansible/tmp/ansible-tmp-1584998644.2186158-197239467383549/AnsiballZ_zabbix_host.py", line 106, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/root/.ansible/tmp/ansible-tmp-1584998644.2186158-197239467383549/AnsiballZ_zabbix_host.py", line 49, in invoke_module
    imp.load_module('__main__', mod, module, MOD_DESC)
  File "/usr/lib64/python3.6/imp.py", line 235, in load_module
    return load_source(name, filename, file)
  File "/usr/lib64/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/tmp/ansible_zabbix_host_payload_84maim7t/__main__.py", line 857, in <module>
  File "/tmp/ansible_zabbix_host_payload_84maim7t/__main__.py", line 817, in main
  File "/tmp/ansible_zabbix_host_payload_84maim7t/__main__.py", line 502, in check_all_properties
KeyError: 'inventory_mode'

Regards,
Tobias

I've downloaded the zabbix_host.py file from https://raw.githubusercontent.com/ansible/ansible/9110fa9ea7311f0a67cfe3e2794c7e238213a369/lib/ansible/modules/monitoring/zabbix/zabbix_host.py and placed it in /usr/lib/python3.6/site-packages/ansible/modules/monitoring/zabbix

Perhaps you could try to follow @dj-wasabi's suggestion. Setup library ini key in ansible.cfg (https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-module-path) and put the module patched in there.
This may help you.

Hi @tobiasehlert
Where you able to test it?
This repository will be "closed" soon as this role will be transferred to a collection. After that, this role will be read-only available and thus any other changes will be made into the collection.

Hi @dj-wasabi,
Yes, I managed to get the library path working and can confirm that the playbook is running successful.
TASK [dj-wasabi.zabbix-agent : Create a new host or update an existing host's info] *****************************************************************************************************************************************************
ok: [XXX.com -> localhost]
ok: [XXY.com -> localhost]

So the PR https://github.com/ansible/ansible/pull/66860 works fine for me :)
Regards,
Tobias

@tobiasehlert
Nice! Thanks! 👍


Refactor to IshTypeFieldSetup by replacing hardcoded System and Required fields by dynamic ones

Used to be [ISHREMOTE-022]
Refactor to IshTypeFieldSetup by replacing hardcoded System and Required fields by dynamic ones

ISHRemote abstract class cmdlet offers RemoveSystemFields, AddRequiredFields, AddRequiredDocumentObjFields, AddRequiredPublicationOutputFields. These should be made more dynamic
Functions like RemoveNonIdentifierFields/AddRequiredFields/RemoveSystemFields respect metadata-requests for only logical or version... and the ActionMode
Introduce IShSession.StrictMetadataPreference inspired by $DebugPreference with similar values

SilentlyContinue Client-side silent filtering of nonexisting and unallowed fields. (e.g Nice for repository folder syncing with mismatching metadata setup)
Continue Client-side filtering of nonexisting and unallowed fields displaying a Write-Verbose message but still continues. (default)
Off Client-side filtering of nonexisting and unallowed fields is turned off. No handling but simply executes the API call, most likely resulting in a Write-Error. This allows api/pester tests like IshUser PASSWORD field should not allowed to be read.

EventMonitor (table type) will be something separate, currently ISHTypeFieldSetup only contains card types

[x] DocumentObj
[x] EDT
[x] Folder
[x] OutputFormat
[x] PublicationOutput
[x] Settings
[x] User
[x] UserGroup
[x] UserRole

GH-3: Refactor RemoveSystemFields cmdlet base class implementations to IshTypeFieldSetup #8


Error during bruker file conversion (BAF) to MzML with MSConvert (version 3.20058)

There were other files acquired with the same method that worked. Just a few files failed. They work properly in DataAnalysis. I can send that specific sample data if needed (~700M).
This is what the log says:
Starting...
Opening file "E:\sjin28\20200213-3502-A2-microfrac-redownload\040_1-45_1_274.d" for read...
Failed - System.Exception: File format problem: expected different segment.
at pwiz.CLI.msdata.ReaderList.read(String filename, MSDataList results, ReaderConfig config)
at MSConvertGUI.MainLogic.processFile(String filename, Config config, ReaderList readers, Map2 usedOutputFilenames)    at MSConvertGUI.MainLogic.Go(Config config, Map2 usedOutputFilenames)

Yeah, I'll need to see a failing file to understand this. Are these native BAF files or converted from FID?

native BAF.
Do you have a place where I can post that?

Google drive would be fine.

Shared to your …42@gm… email.

I see the same error when using baf2sql:
BAF file = 040_1-45_1_274.d/analysis.baf
(Re-)Generating SQLite cache...
2020-02-27 15:46:26.933307 [tid=0xe15fa7c0] [INFO ] bdal.io.baf2sql: Generating new SQLite cache in analysis directory: 040_1-45_1_274.d/analysis.sqlite
*** caught std::exception: ***
what() = File format problem: expected different segment.
boost::diagnostic_information() = /home/jenkins/workspace/de.bdal.cpp.io.baf2sql-c-linux-x86_64-gcc6-parameterized/src/include/io/baf2sql/baf2sql_cpp.h(38): Throw in function void baf2sql::throwLastBaf2SqlError()
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorstd::runtime_error >
std::exception::what: File format problem: expected different segment.

Do you have a contact at Bruker that work on baf2sql?

Can you also share one of the runs from the same method that doesn't have the problem? I agree it's clearly in the Bruker API so it's best to forward to them.

Sure, let me push that in the same directory.

I renamed them with WORKING/NOTWORKING

Do you know where the BackgroundLinePos.ami and DensViewPos.ami files came from? I think those are calibration files.

They are likely coming from Data Analysis. We do a manual calibration step with an automated method in DataAnalysis (internal calibration). We do that so our files are calibrated, at least that's how baf2sql does it, I hope ProteoWizard keep the calibration, I will have to check that.

So why doesn't the "non-working" file have those calibration files? Does it process properly (not just open) in DataAnalysis?

It works well in DataAnalysis, it just fails in BAF2SQL and ProteoWizard.

I will check if all scans are accessible in DataAnalysis, there may have been a file corruption, but it happened on quite a few files and that's the first time we see that.

Hi @bjonnh , sorry it took a while to get this to my Bruker contact and back. He says:

It seems like your customer came across a bug in the acquisition software used (otofControl <IP_ADDRESS>). Inspection of the method shows that there are two pretty short time segments defined in the method (unit is minutes):

<segment endtime="0.01"> ...
<segment endtime="0.0316667"> ...
<segment endtime="0.223333">...
<segment endtime="-35.525">...

What can happen in such a case is that due to timing variations (especially in the case of low rate of spectrum acquisition), not a single measured spectrum falls into one of those short segments, in which case the data-writing layer in otofControl is confused and writes broken data.
I suggest your customer fix the method by removing the first two segments, or at least making them long enough (i.e., much longer than the time it takes to acquire a spectrum).

You said DataAnalysis is able to handle this data, which indicates the "broken data" can be handled more gracefully, but he also said:

There may be ways to fix the existing data and / or add a workaround to Baf2Sql, but I’m not sure I have capacities for that right now.


i18n - Translation Download

I've created this issue so we don't mess up #29.
Quick summary of the status quo:
There is no complete composer based solution to get translations.
The only thing that comes close is https://wp-languages.github.io/ which unfortunately only supports core and a small selected number of themes and plugins.
Thoughts
When building a replacement ourselves that plays nice with wpstarter we actually have multiple problems to solve:

Actually getting translations at all. We'd probably get it from the API. I vaguely remember seeing a PHP client for it somewhere... We'd also need a custom installer, something like the installer that https://wp-languages.github.io/ uses.
If I remember correctly translations don't really have sane versioning. You just ask the API for the newest translations for a certain version of core/theme/plugin and get what they have. This may change without WP versions changing as translations get updated independently. At least that is what I remember. Correct me if I'm wrong. :wink:
Translations are strongly tied to the WP version. Once we have composer packages for languages the most reasonable thing would be if they were dependencies of the core package itself, but that would mean convincing John of adding it. Otherwise you always have to keep versions in sync manually, right?

WP-CLI as an alternative
I see that there is some talk about some integration with WP-CLI in #33. Maybe to keep things simple we could just build a wpstarter step on top of wp core language update. I know that this is not an ideal solution as it relies on the internal workings of WP update, but on the other hand it may just work without much hassle. What do you think?

First thoughts:

First of all, I don't want languages be a blocker for WP Starter version 3, so I'm glad this is is a separate issue and even if milestone says "3.0.0" I will not be surprised if this will not be part of that release.

https://wp-languages.github.io/ is good enough for core. For plugins not really so. However, there are ways to download from remote locations using Composer scripts, so if necessary this can already be done with some effort on writing a custom Composer script... With WP Starter v3 this sort of things will be much easier. In the future these automatisms for downloading languages could become part of WP Starter or a separate Composer plugin...

Yes, to download the proper translation for core you need to know the version that is actually installed. In a Composer script this is quite easy, here: https://github.com/wecodemore/wpstarter/blob/master/wpstarter/src/Setup.php#L176-L187 how it is done in main WP Starter script. The same thing can be done for each package, in case you need to know the version of specific plugin or theme.

Even if I really want to make WP CLI integration much easier, I don't think it is a good solution for languages. As far as I know, languages download is only available for core, but for core we are already pretty much covered with zero effort. Moreover WP CLI requires a completely working WP install, which may not be the case on site first deploy (if .env is not created yet).

Yesterday night I thought through various ways of offering plugin/theme language files alongside a custom composer.json delivered as ZIP. So far I have some ideas, but no idea where to host such a thing as the only proper way is to run this as service on JavaScript. In every other scenario single server resources are needed and this so far sounds like it is the only chance to find some way to host this service anywhere for free. Note that I have not found anything that allows that as GitHub pages only allows static HTML.

Okay so I found the API client I remembered. Guess what, Rarst wrote it. I haven't tested it but this might be an easy way to get translations in a Composer Script/Plugin.
I am with you, if we can make this work without WP-CLI - even better. Especially because of not needing to rely on a working WP then.
About @franz-josef-kaiser thoughts on hosting I think we can't really go with a normal composer package anyway, as the version ideally needs to be dynamically inferred from the versions installed. Or am I missing something there?
This is also one of my issues with https://wp-languages.github.io/ You manually have to keep versions in sync.
(And even then language files may change without the version changing if I remember correctly. This would totally break the normal Composer workflow. I'm gonna research now if I remember that correctly)

I think we can't really go with a normal composer package anyway, as the version ideally needs to be dynamically inferred from the versions installed

@kraftner What I am thinking about is dynamically generated packages. The w.org API allows to fetch plugin and theme translation files by slug and version, so they can theoretically be generated. The only problem is that I do not want to set up a system that I have to pay for, so the main blocker is finding some SaaS services that provides a plan that allows to host a Nodejs application for free. Static sadly is not enough – unless I find a workaround for GH pages.

I am not sure I do understand correctly what you are saying but I guess by dynamically you still mean that I'll have to define the version of the dynamically generated language composer package so it is the same as the WP version composer package, right? If yes I feel like this is still somewhat of a hassle. It would be cool if the correct version is picked up automatically without manually needing to keep it in sync with the WP version.

@kraftner Mainly I am talking about plugin and theme language packs. Core languages is second priority as it already works somehow.

@kraftner I don't think that API clinet is a good choice. It comes with a (pretty outdated) version of Guzzle as dependency.
If I add that API client to WP Starter, all websites that used it will install Guzzle and then any plugin / theme / package that uses another verion of Guzzle can't be installed because a conflict with something that is not really in use in the website...
So I think that is not an option.
To don't introduce more dependencies, in Composer scripts we will need to use Composer utilitites, like Composer\Util\RemoteFilesystem.

@franz-josef-kaiser Yes, but it is the same thing there for plugins and themes, right?
"wpackagist-plugin/akismet": "~3.1",
"koodimonni-language/akismet-de_de": "~3.1"

So when I move akismet to a newer version, e.g. ~3.2 I still need to manually keep it in sync with the language package. And do that for all other plugins and themes as well.
What I am talking about is handling the language with a composer script/plugin or wpstarter itself so you only need to define wanted languages once and the rest happens automatically.
Something like this:
"extra": {
        "wpstarter": {
           languages: ["de_DE"]
        }
}

And then we automatically fillter out all WP dependencies (johnpbloch/wordpress, type:wordpress-plugin, type:wordpress-theme), query the API for translations for them and download those.

@Giuseppe-Mazzapica Yeah, tried it - seems broken anyway. But you're right anyway, this is doable with Composer Utilities alone anyway.

@kraftner Yes, that is what I want the end result to be. Additionally, I also want to clean up languages when a developer removes a package. My main problem at the moment is that Composer queries a registered repository just for a package.json and does not tell what package it is actually searching for. Meaning that I am still searching for a way to build lang packages on the fly.

So after some discussion and attempts I think we can conclude that having a dynamic composer repository is just not doable at all as it contradicts the basic architecture of Composer.
Which probably brings us back to the Composer Script approach. This is doable, I have done a very rough sketch I'll clean up a bit in the coming days.
One edge case I came across is that if we auto-download translations via a Composer Script we might need a way to skip some plugins/themes. People might have their own translations or have naming collisions of private and public plugins/themes.

I quickly want to jump in. I also think that providing some kind of Satis is here the wrong point.
The config driven aproach from @kraftner by defining the languages could be fine. Additionally WPStarter would have to parse the plugin-slug to fetch translations via offical API:
Endpoint: https://api.wordpress.org/translations/plugins/1.0/?slug={slug}&version={version}
By defning the languages via:
"extra": {
        "wpstarter": {
           languages: ["de_DE"]
        }
}

We can then iterate over those API-responses and load everything which is needed.
An even easier way to get translations would be just to use the URL to the translation ZIP-file:
https://downloads.wordpress.org/translation/{plugin|theme}/{slug}/{version}/{language}.zip
e.G.
https://downloads.wordpress.org/translation/plugin/akismet/4.0.8/de_DE.zip

WP-CLI v2.0.0, which will be released in a few days, will include the following additions:

wp language plugin install|update|uninstall
wp language theme install|update|uninstall
wp i18n make-pot

In case someone wants to help with the single missing piece for proper Composer workflows, here's the issue for adding a --prune flag to language core|plugin|theme uninstall: https://github.com/wp-cli/language-command/issues/22

Another option: https://twitter.com/bjornjohansen/status/1028005191604490240?s=19

So, we had today a discussion at Inpsyde regarding this issue.
In our day-to-day work we deal the vast majority of times with plugins/themes which are not hosted on wp.org.
Now, those packages most of the times are shipped with languages. Which means that int the vast of majority of cases a WordPress package falls in one these two options:

is hosted on wp.org, so languages can be downloaded quite predictably directly from wp.org
is hosted somewhere else, with translation files included, so download it is not necessary

However, I think there are some issues which are not very well addressed by existing solutions:
Issue 1: Plugins with code hosted on GitHub (or such), but languages in wp.org
It might seems a very strange case, well it is not. Nowaday many developers uses GitHub (or such) to actively develop plugins, but then push on wp.org at release time. When this happen, and the plugin developers support Composer, they need to ship the vendor folder on wp.org. If one wants to use such a plugin with WP Starter it is way better to use the GitHub version because that (likely & hopefully) does not contain the vendor folder, which is not necessary with WP Starter, and might even be harmful.
However, the GitHub (or such) version, probably will not contain languages, because the developer will very likely use wp.org to manage those, and benefit from the (potential) help from WP community for translations.
When this happen there's basically no way to predicably know from where download the languages. In fact, there's absolutely no standard or predictable way to know the wp.org plugin "slug" from the Composer package name in the format "vendor/name".
Current version of MultilingualPress (v2.*) is an example of this situation.
(And the plugin linked in last @schlessera comment would fail for it, because Composer name and wp.org slug does not match).
Issue 2: Plugins with code hosted on wp.org, but languages stored somewhere else
As you probably know, theres's a kind of "structure" on wp.org to manage languages. Not even the plugin/theme author is authorized by default to just add/remove translations. Moreover, sometimes it is desirable to use a custom translation instead of the "official" one. In my freelancing days, when I worked with many italian clients, it was not rare the case I wanted to use an italian translation made by me, because either  special requirements, or the "official" one was not really good or even missing.
Issue 3: Plugin with code somewhere, but languages somewhere else
Different "premium" plugins (so not hosted on wp.org) uses shared translation services (WordBee, to mention one) to translate the plugin. I think because in this way they can somehow "open" translation strings, and so potentially get a wider audience or/and services from professional translators, without opening the code itself. This is a rare case, I think, but still.
Issue 4: Not all plugins are on wp.org
As already said, these days a plugin from wp.org is a rarity in sites I work on.
If it is true that many custom packages already includes transalations, it is also true that an automated task ran on composer install does not really have a default way to be aware of that. Which means that, very likely, an attempt to download the language from wp.org will be made. Of course the subsequent 404 can be handled nicely, but when a site has, for example, 30 custom plugins and 3 custom themes, do we really want to attempt 33 HTTP requests at every composer update just to find they will end in a 404?
Not to mention that there's no guarantee that those requests will be actually 404. If a different plugin, but with a matching slug is found on wp.org the translation will be downloaded and because of the way WordPress loads translations (priority to the ones inside wp-content) that wrong translation will be loaded in production, even if it has nothing to do with the custom plugin which is installed.
Issue 5: Code and language version too coupled with version
First of all there should be some way to easily choose the "best" possible version of a translation for a given version of the plugin. After that, it should be possible to update a languages independently from packages.
Issue 6: Optimizations
If a given version of a language exists in the project folder, that should not be downloaded again.
In a site with 4 languages , 30 plugins and 2 themes, 128 downloads would be run on every Composer update, not matter if not necessary, if there's no a check for existence in place.
Besides of that, one the streght points of Composer is cache, but plainly downloading lang files doesn't have that benefit. Another streght point of Composer is the lock file. This is missed in many current solutions for languages.
Issue 7: Compatibility with WP Starter
WP Starter has a setting to configure the wp-content folder localtion. A solution to integrate in WP Starter, needs to respect that setting.
To make a summary, a proper solution should:

allow to define a source of translations that is different from the source of the code (this basically covers the first 3 issues)
treat plugins who are not in wp.org as first class citizen. It has to be designed thinking that 99% of the packages will be not on wp.org (even if that percentace is not the real one)
be as much optimized as possible: allow avoid unnecessary HTTP requests, maybe use a cache mechanism, and possibly benefit of a lock feauture
be compatible with WP Starter.

Some of the existing solutions do (totally or partially) this things, but it seems to me that none of them addresses enough these concerns to be considered a good solution for WP Starter.
So... what to do?
Well I don't have a clear idea. An improved version of the Bjørn Johansen's plugin linked by Alain could be a starting point.
Besides of that, I would like something that allow the package itself to declare they way it handles translations so the the upstream (WP Starter) can read that information and act accordingly.
This could reduce a lot the uptsream maintenance. Imagine if the dependencies of each and any package  used in a project should be defined at the root level. That would definetively not work.
The same reasoning IMO can be done for translations, moving the burden of edge case handling from the root to the package.

I thought a lot about this in these days. Considering that:

the matter is quite complex
theres' work being made outside WP Starter
WP Starter 3 introduces the concept of "WP Starter extensions"

I see this being solved outside WP Starter. Being it a new WP Starter extension, or the embracing of someone else tool... that's a decision that can be made after 3.0 release.
So I decided to close this issue, but this is on the top of the list of matters to tackle after 3.0 release.