bundle install fails for chef package due to missing file

I'm trying to run bundle install to get my chef related gems installed. It works for all gems except the chef gem itself.
My gem file looks like this:
source 'https://rubygems.org' do
  gem 'chef', '13.0.118'
end

The command line is:
bundle install --gemfile="c:\myproject\Gemfile" --path "c:\myproject\gems" --binstubs="c:\myproject\gems\bin" --no-cache

And the output is:
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Installing public_suffix 2.0.5
Installing builder 3.2.3
Using bundler 1.12.5
Installing fuzzyurl 0.9.0
Installing mixlib-config 2.2.4
Installing ffi 1.9.18
Installing wmi-lite 1.0.0
Installing libyajl2 1.2.0 with native extensions
Installing hashie 3.5.5
Installing mixlib-log 1.7.1
Installing rack 2.0.1
Installing uuidtools 2.1.5
Installing diff-lcs 1.3
Installing erubis 2.7.0
Installing highline 1.7.8
Installing iniparse 1.4.2
Installing iso8601 0.9.1
Installing mixlib-cli 1.7.0
Installing net-ssh 4.1.0
Installing ipaddress 0.8.3
Installing plist 3.3.0
Installing systemu 2.6.5
Installing proxifier 1.0.3
Installing rspec-support 3.5.0
Installing multi_json 1.12.1
Installing net-telnet 0.1.1
Installing sfl 2.3
Installing syslog-logger 1.6.8
Installing win32-api 1.5.3
Installing addressable 2.5.1
Installing win32-process 0.8.3
Installing win32-dir 0.5.1
Installing win32-ipc 0.7.0
Installing win32-eventlog 0.6.3
Installing win32-mmap 0.4.2
Installing ffi-win32-extensions 1.0.3
Installing ffi-yajl 2.3.0 with native extensions
Installing mixlib-archive 0.4.1
Installing mixlib-authentication 1.4.1
Installing net-sftp 2.1.2
Installing net-ssh-gateway 2.0.0
Installing net-scp 1.2.1
Installing rspec-core 3.5.4
Installing rspec-expectations 3.5.0
Installing rspec-mocks 3.5.0
Installing windows-api 0.4.4
Installing mixlib-shellout 2.2.7
Installing win32-event 0.6.3
Installing win32-mutex 0.4.3
Installing win32-service 0.8.10
Installing chef-zero 13.0.0
Installing net-ssh-multi 1.2.1
Installing specinfra 2.67.9
Installing rspec_junit_formatter 0.2.3
Installing rspec-its 1.2.0
Installing rspec 3.5.0
Installing chef-config 13.0.118
Installing serverspec 2.38.0
Installing ohai 13.0.1
Installing chef 13.0.118 with native extensions

Errno::ENOENT: No such file or directory @ rb_sysopen - c:/myproject/gems/ruby/2.3.0/gems/chef-13.0.118-universal-mingw32/spec/functional/assets/yumrepo/repodata/4ac40fa3c6728c1401318e2e20a997436624e83dcf7a5f952b851ef422637773-filelists.sqlite.bz2
An error occurred while installing chef (13.0.118), and Bundler cannot continue.
Make sure that `gem install chef -v '13.0.118'` succeeds before bundling.

The error is correct, that file does not exist if I install with bundler but if I run gem install chef with the following command line it works just fine and all files are there.
gem install --install-dir c:\myproject\gems chef -v 13.0.118
My global gem list is
*** LOCAL GEMS ***

bigdecimal (default: 1.2.8)
bundler (1.14.6)
io-console (default: 0.4.5)
json (default: 1.8.3)
psych (default: 2.1.0)
rake (12.0.0)
rdoc (default: 4.2.1)

And my OS is Windows 10.
Any ideas why this is not working the way I would expect it to? Am I missing additional gems / tools?

that looks more like a chef packaging bug than a bundler bug, probably should go into https://github.com/chef/chef/issues/new instead of here

Ok will report it there.

Not really sure how this is a chef error. If you fetch the gem from rubygems.org and look inside the data.tar.gz, it does have this file.
That's quite the long filename though, are windows path length limits at play?


fix methods from parent controllers

when we use $item->class === $controller->name it will return false for all methods from parent classes, so we need to check if $item->class is equal the current class or any parent class.

Not tested, but seems legit. Make sure to test thoroughly before deploying! Merged!!


Default geometry? (more Swift question than GeoSwift)

Hello,
I am wondering if it is possible to write in Swift a function that always return a valid geometry:
func getValidGeometry(wkt: String) -> Geometry {   do {     return try Geometry(wkt: coordinates)       } catch {     return try! Geometry(wkt: "POINT(0 0)")   } }
This function will work but Swift will consider that this function can throw. Swift is right but it will be great that GEOSwift can provide a basic geometry without potential throw.
What do you think about that?
Thanks!

You can create a point without the risk of throwing by avoiding the wkt init method: let point = Point(x: 0, y: 0). Convert it to Geometry by either point.geometry or Geometry.point(point)

Thank you, I did not know it was possible. 👍


An Explanation of angles used in paper and used in code.

Hi,
I am attempting to use this method to train on my own dataset which I have generated in Unity using the Unity Perception Package, therefore this requires quite a few modifications of the Dataset class. Unity will generate the ground truth and provide me with the following:
X,Y,Z position of the 3D bounding box center wrt. the camera
Object dimensions
Object rotation wrt. global coordinate frame
2D bounding box coordinates within the image
Camera intrinsic matrix
In the corresponding paper, the three angles of interest are Theta Ray, Theta L, and Theta. I believe understand what these are and the correspondance between them:
Theta ray is the ray angle of the object center (calculated as the angle between the camera principal point and 3D bounding box center).
Theta L is the local orientation i.e. orientation of object wrt. to the camera.
Theta is the global orientation of the object.
Theta = Theta Ray + Theta L
However, looking in the Dataset class, there are references to three different angles: Alpha, Ry and theta_ray. As far as I understand it, Alpha is equivalent to Theta L (as this it what you are regressing), Ry is equivalent to Theta (global orientation), and theta_ray is self-explanitory.
As far as I am aware, theta_ray is calculated using the position of the 2D bounding box within the image, and the model is predicting Alpha, and using the correspondance between these we can find the global orientation of the object.
I would just like to confirm that all this is correct, as I have been having a hard time understanding this.
Your feedback is greatly appreciated :)

I have the same confusion，The alpha of the KITTI dataset is not the Theta L in the paper,and in the code torch_lib/Dataset.py  alpha = Alpha = line[3] .i found another  code https://github.com/shashwat14/Multibin/blob/master/data_prep.py , It's another way of calculating Theta L

This code calculates the Theta in a different way than the paper，it use  "r_y= alpha +theta" in KITTI

hey do you know the loss  may be lower than 0  ,is it  normal and acceptable?


TestCentric can't use TestEngineActivator

NUnit Compatibility Issue
Category: API
Visibility: Developers
Resolution: Unresolved
Description
The NUnit API includes a class, TestEngineActivator, which locates and instantiates a copy of the NUnit engine. Obviously, TestCentric cannot use this.

Fixed in the latest code although further improvements may be needed.

:tada: This issue has been resolved in version 2.0.0-beta3 :tada:
The release is available on:

GitHub Release
NuGet Package


doc: defer stream

Instructions about the new plugin and some examples like we have in our defer-stream example then we should be good.


Error in cox-regression while evaluating

I am using XGBoost version 1.3.3 on Windows with Python 3.6.8. On attempting to do training with objective set to survival:cox, I repeatedly get this error.
Traceback (most recent call last):
  File "xgboost_survival_cv.py", line 94, in <module>
    evals=[(data_m, 'train'), (data_v, 'eval')])
  File "C:\Program Files\Python36\lib\site-packages\xgboost\training.py", line 235, in train
    early_stopping_rounds=early_stopping_rounds)
  File "C:\Program Files\Python36\lib\site-packages\xgboost\training.py", line 110, in _train_internal
    if callbacks.after_iteration(bst, i, dtrain, evals):
  File "C:\Program Files\Python36\lib\site-packages\xgboost\callback.py", line 427, in after_iteration
    self._update_history(score, epoch)
  File "C:\Program Files\Python36\lib\site-packages\xgboost\callback.py", line 393, in _update_history
    name, s = d[0], float(d[1])
ValueError: could not convert string to float: '-nan(ind)'

There are no nan in my data
I initially assumed this might be due to some overflow since this error often appeared when the test loss (cox-nloglik) exceeded 15 or so (in the last successful boosting iteration), as confirmed by the disappearance of the error on using lesser boosting rounds, smaller learn rate, smaller trees (no overfitting and hence no blowup of the test loss?) or switching off evaluation (empty evals list). But, later, I got the same error when the test loss was 6 (in the last successful boosting iteration). Further, on removing the evaluation (I need to implement early_stopping_rounds so this is not a long-term option), I still get nan (or inf) in the prediction output, though no error. The data is highly censored (90% right censored), in case that matters.
The run parameters were thus:
{'colsample_bytree': 0.8, 'eta': 0.1, 'max_delta_step': 0, 'max_depth': 3, 'min_child_weight': 100,
'num_parallel_tree': 20, 'sampling_method': 'uniform', 'subsample': 0.8, 'tree_method':'gpu_hist',
'verbosity':1,  'seed':0, 'objective':'survival:cox', 'eval_metric':'cox-nloglik'}

The same error for many different parameter sets. Another example:
 {'colsample_bytree': 0.8, 'eta': 0.3, 'max_delta_step': 0, 'max_depth': 3, 'min_child_weight': 100, 'num_parallel_tree': 1, 'sampling_method': 'gradient_based', 'subsample': 0.2}

Are you able to post your data and training script? That will help us further diagnose this problem.

I can post the main part of training script and the output. There is a large section of preprocessing and setting up the CV that I am skipping. Also the parameters are just so as to get the error quickly.
    data_m = xg.DMatrix(xsub_train, label=y_coded_train, weight=[imbalance if i == 1 else 1 for i in ysub_train])
    data_v = xg.DMatrix(xsub_test, label=y_coded_test, weight=[imbalance if i == 1 else 1 for i in ysub_test])
    print('Imbalance: ', imbalance)
    print('Length/NA ytrain:', len(y_coded_train), np.sum(np.isnan(y_coded_train)))
    print('Length/NA xtrain:', xsub_train.shape, np.sum(np.isnan(xsub_train.to_numpy().flatten())))
    print('Length/NA yest:', len(y_coded_test), np.sum(np.isnan(y_coded_test)))
    print('Length/NA xtest:', xsub_test.shape, np.sum(np.isnan(xsub_test.to_numpy().flatten())))
    print(p)
    print(np.sum(ysub_train), np.sum(ysub_test))
    m = xg.train(params=p, dtrain=data_m, num_boost_round=1000, early_stopping_rounds=25,
                 evals=[(data_m, 'train'), (data_v, 'eval')])

Output (In other runs, like I said above, the score does not have to reach this high for the error):
Imbalance:  31.582978723404256
Length/NA ytrain: 6125 0
Length/NA xtrain: (6125, 52) 0
Length/NA yest: 1532 0
Length/NA xtest: (1532, 52) 0
{'colsample_bytree': 0.8, 'eta': 0.3, 'max_delta_step': 0, 'max_depth': 3, 'min_child_weight': 100, 'num_parallel_tree': 1, 'sampling_method': 'unifo
rm', 'subsample': 0.8, 'tree_method': 'gpu_hist', 'objective': 'survival:cox', 'eval_metric': 'cox-nloglik', 'seed': 0, 'verbosity': 1}
188 47
[0]     train-cox-nloglik:8.88308       eval-cox-nloglik:6.99363
[1]     train-cox-nloglik:9.26756       eval-cox-nloglik:7.79090
[2]     train-cox-nloglik:9.64561       eval-cox-nloglik:8.33538
[3]     train-cox-nloglik:10.17499      eval-cox-nloglik:9.04028
[4]     train-cox-nloglik:10.41129      eval-cox-nloglik:9.17929
[5]     train-cox-nloglik:10.87415      eval-cox-nloglik:10.01846
[6]     train-cox-nloglik:11.59993      eval-cox-nloglik:10.37045
[7]     train-cox-nloglik:12.22635      eval-cox-nloglik:10.77931
[8]     train-cox-nloglik:12.22635      eval-cox-nloglik:10.77931
[9]     train-cox-nloglik:12.40515      eval-cox-nloglik:11.21803
[10]    train-cox-nloglik:12.40514      eval-cox-nloglik:11.21803
[11]    train-cox-nloglik:12.40514      eval-cox-nloglik:11.21803
Traceback (most recent call last):
  File "xgboost_survival_cv.py", line 101, in <module>
    evals=[(data_m, 'train'), (data_v, 'eval')])
  File "C:\Program Files\Python36\lib\site-packages\xgboost\training.py", line 235, in train
    early_stopping_rounds=early_stopping_rounds)
  File "C:\Program Files\Python36\lib\site-packages\xgboost\training.py", line 110, in _train_internal
    if callbacks.after_iteration(bst, i, dtrain, evals):
  File "C:\Program Files\Python36\lib\site-packages\xgboost\callback.py", line 427, in after_iteration
    self._update_history(score, epoch)
  File "C:\Program Files\Python36\lib\site-packages\xgboost\callback.py", line 393, in _update_history
    name, s = d[0], float(d[1])
ValueError: could not convert string to float: '-nan(ind)'

Should I print anything else of importance?

@Stochastic13 Can you post the data after the pre-processing step? If we cannot run the program ourselves, it's hard for us developers to find the cause of the error.

@hcho3 I understand. The data is confidential unfortunately.
Here's a reproducible example I recreated with random data:
import numpy as np
import pandas as pd
import xgboost as xg

print(xg.__version__)
print(pd.__version__)
print(np.__version__)

param_cv = dict()
param_cv['eta'] = 0.3
param_cv['max_depth'] = 3
param_cv['min_child_weight'] = 100
param_cv['max_delta_step'] = 0
param_cv['subsample'] = 0.8
param_cv['sampling_method'] = 'uniform'
param_cv['colsample_bytree'] = 0.8
param_cv['num_parallel_tree'] = 1
param_cv['tree_method'] = 'gpu_hist'
param_cv['objective'] = 'survival:cox'
param_cv['eval_metric'] = 'cox-nloglik'
param_cv['seed'] = 0
param_cv['verbosity'] = 1
np.random.seed(0)

imbalance = 31.58

xsub_train = pd.DataFrame(np.random.normal(0, 1, (6125, 52)))
ysub_train = np.random.choice([0, 1], 6125, p=[imbalance / (imbalance + 1), 1 / (imbalance + 1)])
y_coded_train = np.random.randint(1, 1500, 6125)
y_coded_train[ysub_train == 0] = -y_coded_train[ysub_train == 0]

xsub_test = pd.DataFrame(np.random.normal(0, 1, (1532, 52)))
ysub_test = np.random.choice([0, 1], 1532, p=[imbalance / (imbalance + 1), 1 / (imbalance + 1)])
y_coded_test = np.random.randint(1, 1500, 1532)
y_coded_test[ysub_test == 0] = -y_coded_test[ysub_test == 0]
data_m = xg.DMatrix(xsub_train, label=y_coded_train, weight=[imbalance if i == 1 else 1 for i in ysub_train])
data_v = xg.DMatrix(xsub_test, label=y_coded_test, weight=[imbalance if i == 1 else 1 for i in ysub_test])
m = xg.train(params=param_cv, dtrain=data_m, num_boost_round=1000, early_stopping_rounds=25,
             evals=[(data_m, 'train'), (data_v, 'eval')])

And the Output:
1.3.3
1.1.5
1.19.5
[0]     train-cox-nloglik:7.98620       eval-cox-nloglik:6.65554
[1]     train-cox-nloglik:8.27961       eval-cox-nloglik:7.17497
[2]     train-cox-nloglik:8.66985       eval-cox-nloglik:7.64955
[3]     train-cox-nloglik:9.10624       eval-cox-nloglik:8.32161
[4]     train-cox-nloglik:9.56293       eval-cox-nloglik:8.84506
[5]     train-cox-nloglik:10.12860      eval-cox-nloglik:9.36206
[6]     train-cox-nloglik:10.66752      eval-cox-nloglik:10.30291
[7]     train-cox-nloglik:11.37288      eval-cox-nloglik:10.78025
[8]     train-cox-nloglik:12.12385      eval-cox-nloglik:12.21345
[9]     train-cox-nloglik:12.66841      eval-cox-nloglik:13.19342
[10]    train-cox-nloglik:12.66842      eval-cox-nloglik:13.19342
[11]    train-cox-nloglik:12.66842      eval-cox-nloglik:13.19342
Traceback (most recent call last):
  File "xgboost_error.py", line 39, in <module>
    evals=[(data_m, 'train'), (data_v, 'eval')])
  File "C:\Program Files\Python36\lib\site-packages\xgboost\training.py", line 235, in train
    early_stopping_rounds=early_stopping_rounds)
  File "C:\Program Files\Python36\lib\site-packages\xgboost\training.py", line 110, in _train_internal
    if callbacks.after_iteration(bst, i, dtrain, evals):
  File "C:\Program Files\Python36\lib\site-packages\xgboost\callback.py", line 427, in after_iteration
    self._update_history(score, epoch)
  File "C:\Program Files\Python36\lib\site-packages\xgboost\callback.py", line 393, in _update_history
    name, s = d[0], float(d[1])
ValueError: could not convert string to float: '-nan(ind)'

@hcho3 I can also try with similar random datasets with different censoring extents, if that sounds like something that helps narrow down the problem. I was just worried if I had made some mistake in running the training.

Weird that the nloglik increases.

@trivialfis The increase doesn't have to be large either for the error, in case it helps. The following has the same error after 85 iterations, but both the train and the eval score does not change at all up to the first 5 decimal places.
import numpy as np
import pandas as pd
import xgboost as xg

print(xg.__version__)
print(pd.__version__)
print(np.__version__)

param_cv = dict()
param_cv['eta'] = 0.1
param_cv['max_depth'] = 3
param_cv['min_child_weight'] = 200
param_cv['max_delta_step'] = 0
param_cv['subsample'] = 0.5
param_cv['sampling_method'] = 'uniform'
param_cv['colsample_bytree'] = 0.5
param_cv['num_parallel_tree'] = 1
param_cv['tree_method'] = 'gpu_hist'
param_cv['objective'] = 'survival:cox'
param_cv['eval_metric'] = 'cox-nloglik'
param_cv['seed'] = 0
param_cv['verbosity'] = 1
np.random.seed(0)

imbalance = 31.58

xsub_train = pd.DataFrame(np.random.normal(0, 1, (6125, 52)))
ysub_train = np.random.choice([0, 1], 6125, p=[imbalance / (imbalance + 1), 1 / (imbalance + 1)])
y_coded_train = np.random.randint(1, 1500, 6125)
y_coded_train[ysub_train == 0] = -y_coded_train[ysub_train == 0]

xsub_test = pd.DataFrame(np.random.normal(0, 1, (1532, 52)))
ysub_test = np.random.choice([0, 1], 1532, p=[imbalance / (imbalance + 1), 1 / (imbalance + 1)])
y_coded_test = np.random.randint(1, 1500, 1532)
y_coded_test[ysub_test == 0] = -y_coded_test[ysub_test == 0]
data_m = xg.DMatrix(xsub_train, label=y_coded_train, weight=[imbalance if i == 1 else 1 for i in ysub_train])
data_v = xg.DMatrix(xsub_test, label=y_coded_test, weight=[imbalance if i == 1 else 1 for i in ysub_test])
m = xg.train(params=param_cv, dtrain=data_m, num_boost_round=1000, early_stopping_rounds=600,
             evals=[(data_m, 'train'), (data_v, 'eval')])
quit(1)

I am using XGBoost version 1.3.3 on Windows with Python 3.6.8. On attempting to do training with objective set to survival:cox, I repeatedly get this error.
Traceback (most recent call last):
  File "xgboost_survival_cv.py", line 94, in <module>
    evals=[(data_m, 'train'), (data_v, 'eval')])
  File "C:\Program Files\Python36\lib\site-packages\xgboost\training.py", line 235, in train
    early_stopping_rounds=early_stopping_rounds)
  File "C:\Program Files\Python36\lib\site-packages\xgboost\training.py", line 110, in _train_internal
    if callbacks.after_iteration(bst, i, dtrain, evals):
  File "C:\Program Files\Python36\lib\site-packages\xgboost\callback.py", line 427, in after_iteration
    self._update_history(score, epoch)
  File "C:\Program Files\Python36\lib\site-packages\xgboost\callback.py", line 393, in _update_history
    name, s = d[0], float(d[1])
ValueError: could not convert string to float: '-nan(ind)'

There are no nan in my data I initially assumed this might be due to some overflow since this error often appeared when the test loss (cox-nloglik) exceeded 15 or so (in the last successful boosting iteration), as confirmed by the disappearance of the error on using lesser boosting rounds, smaller learn rate, smaller trees (no overfitting and hence no blowup of the test loss?) or switching off evaluation (empty evals list). But, later, I got the same error when the test loss was 6 (in the last successful boosting iteration). Further, on removing the evaluation (I need to implement early_stopping_rounds so this is not a long-term option), I still get nan (or inf) in the prediction output, though no error. The data is highly censored (90% right censored), in case that matters.
The run parameters were thus:
{'colsample_bytree': 0.8, 'eta': 0.1, 'max_delta_step': 0, 'max_depth': 3, 'min_child_weight': 100,
'num_parallel_tree': 20, 'sampling_method': 'uniform', 'subsample': 0.8, 'tree_method':'gpu_hist',
'verbosity':1,  'seed':0, 'objective':'survival:cox', 'eval_metric':'cox-nloglik'}

The same error for many different parameter sets. Another example:  {'colsample_bytree': 0.8, 'eta': 0.3, 'max_delta_step': 0, 'max_depth': 3, 'min_child_weight': 100, 'num_parallel_tree': 1, 'sampling_method': 'gradient_based', 'subsample': 0.2}

same problem, have you solved this? Thx!

@SandyBy Not directly, unfortunately. Had to change the data processing to get different results. Not much success with other implementations either. See if scikit-survival helps you since it has gradient-boosted learning with cox-ph loss. Is much slower than XGBoost though.

@SandyBy Not directly, unfortunately. Had to change the data processing to get different results. Not much success with other implementations either. See if scikit-survival helps you since it has gradient-boosted learning with cox-ph loss. Is much slower than XGBoost though.

If you don't use cv, it goes well. Also, I tried scikit-survival already, Thx a lot for kind reply!

Hi everyone, I found a easy way to fix this bug. This is due to reason that nloglik goes to infinity or nan then it can't be converted into float.
in the xgboost\callback.py file
change line:  "cvmap[(metric_idx, k)].append(float(v))"
to:                "            try:
cvmap[(metric_idx, k)].append(float(v))
except:
cvmap[(metric_idx, k)].append(numpy.nan)"
Thanks

Hello. I tried your method, but I encountered a new Bug.
File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\xgboost\core.py", line 617, in inner_f
    return func(**kwargs)
  File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\xgboost\training.py", line 196, in train
    if cb_container.after_iteration(bst, i, dtrain, evals):
  File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\xgboost\callback.py", line 259, in after_iteration
    metric_score = [(n, float(s)) for n, s in metric_score_str]
  File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\xgboost\callback.py", line 259, in <listcomp>
    metric_score = [(n, float(s)) for n, s in metric_score_str]
ValueError: could not convert string to float: '-nan(ind)'

This error is converted to the next step.

@SandyBy Not directly, unfortunately. Had to change the data processing to get different results. Not much success with other implementations either. See if scikit-survival helps you since it has gradient-boosted learning with cox-ph loss. Is much slower than XGBoost though.

If you don't use cv, it goes well. Also, I tried scikit-survival already, Thx a lot for kind reply!

Hi everyone, I found a easy way to fix this bug. This is due to reason that nloglik goes to infinity or nan then it can't be converted into float.
in the xgboost\callback.py file
change line: "cvmap[(metric_idx, k)].append(float(v))"
to: " try: cvmap[(metric_idx, k)].append(float(v)) except: cvmap[(metric_idx, k)].append(numpy.nan)"
Thanks

Hello. I tried your method, but I encountered a new Bug.
File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\xgboost\core.py", line 617, in inner_f
    return func(**kwargs)
  File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\xgboost\training.py", line 196, in train
    if cb_container.after_iteration(bst, i, dtrain, evals):
  File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\xgboost\callback.py", line 259, in after_iteration
    metric_score = [(n, float(s)) for n, s in metric_score_str]
  File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\xgboost\callback.py", line 259, in <listcomp>
    metric_score = [(n, float(s)) for n, s in metric_score_str]
ValueError: could not convert string to float: '-nan(ind)'

This error is converted to the next step.

Hello, I also tried the approach above but encounter the same bug as @skyee1


Add documentation, examples, and tests for public functions

Addresses #11
Hi, I've added documentation, examples, and tests to each function. I've used the text from Section 3.13 where relevant to help clarify the different matching usage and their behavioral differences.
See below for examples of how the generated rust documentation looks:

@SimonSapin Hi, is this still being maintained? If so, can you please take a look at my PR to add documentation? Additionally there's #14 which updates the casefolding mappings.
Thanks.

@SimonSapin @Manishearth Hi, can either of you take a look?

I don't maintain this crate. I can look at this eventually, but I'm a bit busy right now.


Install blocked by old version of pip

The install hook fails due to an old version of pip.
When installing "fabric" via pip, the dependency "cryptography" fails with a message stating the version of pip is too old and a traceback as follows: 0
Traceback (most recent call last):
      File "", line 1, in
      File "/var/lib/pip/pip-build-y4ldt5j2/cryptography/setup.py", line 14, in
        from setuptools_rust import RustExtension
    ModuleNotFoundError: No module named 'setuptools_rust'
The install hook succeeds when the modification for bug 1968366 is applied alongside an upgrade of pip as follows:
$ python -m pip install --upgrade pip
If possible, the charm needs to ensure the supported version of pip is available for the dependencies it intends to install during the install hook.

(by vultaire)
If this is a charmcraft-built charm, this is easy to fix.  I've done this for a few charms already.
See here: https://discourse.charmhub.io/t/install-or-update-python-packages-before-packing-a-charm/5158

(by raychan96)
For which release are you seeing this problem? I saw bionic is having similar problem: missing rustc.

(by valexby)
Hi Ray,
The series are Bionic, duplicity is of version 0.7.17-0ubuntu1.1 and the charm is revision 12.
Hope that helps.

(by rgildein)
Hi Paul (@vultaire) we could not use charm-python-packages, since this is reactive charm
and we are using reactive plugin.
However we potentially could use build-packages and define fabric (cryptography) in
wheelhouse.txt instead of installing in with layers. However I could not make it work, so for
now I proposed only add pkg-config and disabling include_system_packages.


Checkout error on Magento <IP_ADDRESS>

Hi support team,
I have an error at the checkout page after installing your extension into our website.
Here is the error detail

It shows that the controller sveacheckout/updateCart/updateCheckout/ can't be found.
Please help to solve it.
Thank you.
Regards,
Han.

Hi,
sveacheckout/updateCart/updateCheckout
Which should load this file
app/code/community/Svea/Checkout/controllers/UpdateCartController.php
and run this method
updateCheckoutAction()
The url is set in sveacheckout.phtml using this code:
<?= Mage::getUrl('sveacheckout/updateCart/updateCheckout', array('_secure' => true)) ?>
As sveacheckout/index/index seems to work my first guess would be that it has something to do with that the url has uppercase characters? Can your setup handle uppercase characters in urls?
Kind Regards
Iesus

Hi Lesus,
Thanks for your feedback.
I tried to do your suggestion but it doesn't work.
Regards,
Han.

Hi,
I tested installing an <IP_ADDRESS> and tested the update myself, however unable to reproduce the error
What does your setup look like, which host operating system, what webserver and so on?

Hi,
I am using Ubuntu 18.04.3 LTS. Apache 2.4.29 and PHP 5.6.40.
I see some issues after updating the order info

Regards,
Han.

No still haven't been able to reproduce the errors, works like a charm when i try.
I see you are using Apache, are you certain the htaccess-file is correct so that the requests are handled by index.php and magento is properly bootstrapped?

Hi,
I fixed the issues on my side.
Thanks for your support.
Regards,
Han.


Improve upvote / downvote comment handling

This is a WIP to fix #32. It solves 2 of the 3 items, but I don't know how to solve the last one perfectly. If we decide to omit it then maybe this PR is done.

[x] Smarter emoji detection

As of the opening of this PR :100: is an acceptable emoji to upvote. To add more acceptable emoji (or text) it can just be added to those arrays. @SpaceK33z set it up that way to begin with.

[x] Count one vote per user. In a PR, a user can first down vote, but after some changes up vote. Only the up vote should count in this scenario.

Now each upvote/downvote is only counted once per user. If the same user upvotes, then downvotes, then upvotes, it should effectively count as a single upvote. Voting 100 times in either direction counts as 1 vote.
Not done:

If the upvote / downvote is followed by some text, don't remove the comment but let it count.

edit: not doing this since there are too many circumstances to consider. A comment with just a vote and nothing else is a vote. Everything else should stay.
It's not even just following text that's what you'll find. Sometimes the emoji can be at the end of the text. It can also be in the middle some place. And if you look at this issue you can see that there's even people complaining out all the +1's with no content, and those aren't votes, just arguing about voting. Not sure how to solve that one.

A couple of points:

When a comment begins with a mention, I'd say not to count that as upvote or downvote disregarding of the content or emoji. This is most probably a reply to something. Sometimes someone can express negative opinion on something and someone to support this negative opinion by mentioning him and give a :+1: to his comment.
I second what @SpaceK33z mentioned in https://github.com/sindresorhus/refined-github/issues/32#issuecomment-188423846. GitHub said they will add some changes to issues which could affect these +/- 1 interactions in substantial way.

I added in the acceptance of :ok_hand: as an upvote and also fixed a bug I found. I also want to point out why this PR is better than just leaving the current implementation. A picture is worth 1000 words, so here are screenshots highlighting the differences. In all of these I'm the only user upvoting and downvoting a bunch of times. I think the PR is a marked improvement.
No extension:

Before the PR:

After the plugin:

To @hkdobrev's feedback:

When a comment begins with a mention, I'd say not to count that as upvote or downvote disregarding of the content or emoji. This is most probably a reply to something. Sometimes someone can express negative opinion on something and someone to support this negative opinion by mentioning him and give a :+1: to his comment.

This PR doesn't change the way @SpaceK33z decided to include/omit comments for votes. The logic in the commentIsUseless function is that if a comment has nothing but an upvote/downvote it counts, and I left that alone, except now I return false for all non-useless comments to help with some other logic.
I think @SpaceK33z made a good choice there. :+1:

I second what @SpaceK33z mentioned in #32 (comment). GitHub said they will add some changes to issues which could affect these +/- 1 interactions in substantial way.

As I understand it, that's sort of the point of this extension. If it breaks because GitHub is improved, so be it.
Relevant part in the README:

My hope is that GitHub will notice and implement some of these much needed improvements. So if you like any of these features, please email GitHub support about adding it.

@sindresorhus I think this is complete actually. I don't want to get into comment parsing to leave text or consider the context of the content. That's super complex I think. What about using +1 in a math equation? Or when someone does +1000! Or a phrase like "if you actually make this work then :+1:"?
A comment with just a vote and nothing else is a vote. Everything else should stay. What do you think?

A comment with just a vote and nothing else is a vote. Everything else should stay. What do you think?

:+1:

OK, updated title and first comment. This should be OK to do a review and merge if it's good.

@paulmolluzzo Good stuff :)


Leverage registry for widgets.

Refs https://github.com/mozilla-services/react-jsonschema-form/pull/127#issuecomment-206434248
Note: While this was previously poorly documented, it's possible this breaks existing usage of the widgets props in custom field components. As we're in a 0.x version and we didn't see much adoption yet, this is probably not that much of a big deal if we properly document the change in the release notes.
Feedback=? @minettiandrea
r=? @almet @magopian @leplatrem

Didn't see any horror, but didn't get the point of this either, so r+! Better if an approval comes from someone else too :)


[Doc Improvement][SEO metatitle update][3947070]

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/bots/how-to/conversations/conversation-basics.md
91
6
link
:white_check_mark:

msteams-platform/get-started/build-message-extension.md
85
11
link
:white_check_mark:

msteams-platform/resources/messaging-extension-v3/search-extensions.md
90
36
link
:white_check_mark:

msteams-platform/samples/collaboration-control.md
91
5
link
:white_check_mark:

msteams-platform/sbs-gs-commandbot.yml
88
30
link
:white_check_mark:

msteams-platform/sbs-teams-live-share.yml
86
12
link
:white_check_mark:

msteams-platform/tabs/how-to/tab-requirements.md
97
2
link
:white_check_mark:

msteams-platform/tabs/open-content-in-stageview.md
81
70
link
:white_check_mark:

msteams-platform/toolkit/install-Teams-Toolkit.md
98
2
link
:white_check_mark:

msteams-platform/toolkit/publish.md
93
9
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/bots/how-to/conversations/conversation-basics.md
91
6
link
:white_check_mark:

msteams-platform/get-started/build-message-extension.md
85
11
link
:white_check_mark:

msteams-platform/resources/messaging-extension-v3/search-extensions.md
90
36
link
:white_check_mark:

msteams-platform/samples/collaboration-control.md
91
5
link
:white_check_mark:

msteams-platform/sbs-gs-commandbot.yml
88
30
link
:white_check_mark:

msteams-platform/sbs-teams-live-share.yml
86
12
link
:white_check_mark:

msteams-platform/tabs/how-to/tab-requirements.md
97
2
link
:white_check_mark:

msteams-platform/tabs/open-content-in-stageview.md
82
69
link
:white_check_mark:

msteams-platform/toolkit/install-Teams-Toolkit.md
99
2
link
:white_check_mark:

msteams-platform/toolkit/publish.md
93
9
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/bots/how-to/conversations/conversation-basics.md
91
6
link
:white_check_mark:

msteams-platform/get-started/build-message-extension.md
85
11
link
:white_check_mark:

msteams-platform/resources/messaging-extension-v3/search-extensions.md
90
36
link
:white_check_mark:

msteams-platform/samples/collaboration-control.md
91
5
link
:white_check_mark:

msteams-platform/sbs-gs-commandbot.yml
88
30
link
:white_check_mark:

msteams-platform/sbs-teams-live-share.yml
86
11
link
:white_check_mark:

msteams-platform/tabs/how-to/tab-requirements.md
97
2
link
:white_check_mark:

msteams-platform/tabs/open-content-in-stageview.md
82
69
link
:white_check_mark:

msteams-platform/toolkit/install-Teams-Toolkit.md
99
2
link
:white_check_mark:

msteams-platform/toolkit/publish.md
93
9
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/bots/how-to/conversations/conversation-basics.md
91
6
link
:white_check_mark:

msteams-platform/get-started/build-message-extension.md
85
11
link
:white_check_mark:

msteams-platform/resources/messaging-extension-v3/search-extensions.md
90
36
link
:white_check_mark:

msteams-platform/samples/collaboration-control.md
91
5
link
:white_check_mark:

msteams-platform/sbs-gs-commandbot.yml
88
30
link
:white_check_mark:

msteams-platform/sbs-teams-live-share.yml
86
11
link
:white_check_mark:

msteams-platform/tabs/how-to/tab-requirements.md
97
2
link
:white_check_mark:

msteams-platform/tabs/open-content-in-stageview.md
82
69
link
:white_check_mark:

msteams-platform/toolkit/install-Teams-Toolkit.md
99
2
link
:white_check_mark:

msteams-platform/toolkit/publish.md
93
9
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/bots/how-to/conversations/conversation-basics.md
91
6
link
:white_check_mark:

msteams-platform/get-started/build-message-extension.md
85
11
link
:white_check_mark:

msteams-platform/resources/messaging-extension-v3/search-extensions.md
90
36
link
:white_check_mark:

msteams-platform/samples/collaboration-control.md
91
5
link
:white_check_mark:

msteams-platform/sbs-gs-commandbot.yml
88
30
link
:white_check_mark:

msteams-platform/sbs-teams-live-share.yml
86
11
link
:white_check_mark:

msteams-platform/tabs/how-to/tab-requirements.md
97
2
link
:white_check_mark:

msteams-platform/tabs/open-content-in-stageview.md
82
69
link
:white_check_mark:

msteams-platform/toolkit/install-Teams-Toolkit.md
99
2
link
:white_check_mark:

msteams-platform/toolkit/publish.md
93
9
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/bots/how-to/conversations/conversation-basics.md
91
6
link
:white_check_mark:

msteams-platform/get-started/build-message-extension.md
85
11
link
:white_check_mark:

msteams-platform/resources/messaging-extension-v3/search-extensions.md
90
36
link
:white_check_mark:

msteams-platform/samples/collaboration-control.md
91
5
link
:white_check_mark:

msteams-platform/sbs-gs-commandbot.yml
88
30
link
:white_check_mark:

msteams-platform/sbs-teams-live-share.yml
86
11
link
:white_check_mark:

msteams-platform/tabs/how-to/tab-requirements.md
97
2
link
:white_check_mark:

msteams-platform/tabs/open-content-in-stageview.md
82
69
link
:white_check_mark:

msteams-platform/toolkit/install-Teams-Toolkit.md
99
2
link
:white_check_mark:

msteams-platform/toolkit/publish.md
93
9
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/bots/how-to/conversations/conversation-basics.md
91
6
link
:white_check_mark:

msteams-platform/get-started/build-message-extension.md
85
11
link
:white_check_mark:

msteams-platform/resources/messaging-extension-v3/search-extensions.md
90
36
link
:white_check_mark:

msteams-platform/samples/collaboration-control.md
91
5
link
:white_check_mark:

msteams-platform/sbs-gs-commandbot.yml
88
30
link
:white_check_mark:

msteams-platform/sbs-teams-live-share.yml
86
11
link
:white_check_mark:

msteams-platform/tabs/how-to/tab-requirements.md
97
2
link
:white_check_mark:

msteams-platform/tabs/open-content-in-stageview.md
82
69
link
:white_check_mark:

msteams-platform/toolkit/install-Teams-Toolkit.md
99
2
link
:white_check_mark:

msteams-platform/toolkit/publish.md
93
9
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.


Question re: Link Targets

In your article you indicate:
Link points to a page or site in the same tenant (same site or another site): Links open in the same tab - ok, this make sense
Link points to a document (same site or different site): Links open in a new tab -   ok, this make sense
Link points to an external (internet) site or document: Links in a new tab - what does this mean?   Did you mean to state "links open in the SAME tab"?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: e8576791-f019-67e1-3d31-fccefd6a165b
Version Independent ID: 4844c3bf-70cd-e5f4-2380-59db5ad32ae5
Content: Planning Navigation for the modern SharePoint experience
Content Source: SharePoint/SharePointOnline/plan-navigation-modern-experience.md
Service: sharepoint-online
GitHub Login: @LoreenLa
Microsoft Alias: loreenl

@officedocsbot assign @scanum

@annloftus  Thank you for submitting this feedback.
From our understanding the issue has been resolved. If you feel it hasn't been resolved please re-open this issue.

@officedocsbot close

@officedocsbot close

@annloftus @scanum
"Link points to a page or site in the same tenant (same site or another site): Links open in the same tab"
This is not the case in Hub Site navigation links. Different site (in same tenant) link opens in new tab . It should open same tab


task: [dochandler] create collector interface

Create collector interface to be able to emit lists of documents to be processed by the docprocessor. (https://github.com/guacsec/guac/pull/16)

Addressed with https://github.com/guacsec/guac/pull/18


[question] How can I pass external args to tests?

My feature depends on a secret. For that reason, I can not put it in plain text. Is there currently a way to pass an external args? In GHA, would be easy to set using devcontainer features test -f secret-feature --args ${{ secrets.MY_TOKEN }}

Are you looking to be able to add remoteEnv variables to a container via the command line when testing? (ie: Should these be environment variables in the running container?)
That's not something we have wired up in the test command currently, but seems like a useful feature

I could imagine a remoteEnv section here https://github.com/devcontainers/cli/blob/main/src/spec-node/featuresCLI/testCommandImpl.ts#L322

yes, please that would be awesome! and probably related to this other question https://github.com/devcontainers/feature-starter/issues/41


Pandas casting int64 to float64, misrepresenting value

I have the following data being returned by Presto (single column, 6 rows):
[(None,),<PHONE_NUMBER>494753670,), (None,), (None,), (None,), (None,)

Due to the missing data (None), Pandas infers the type as float64, converting the value to a wrong id:
>>> column_names = ['organization_lyft_id']
>>> data = [(None,),<PHONE_NUMBER>494753670,), (None,), (None,), (None,), (None,)]
>>> df = pd.DataFrame(list(data), columns=column_names).infer_objects()  # SupersetDataFrame
>>> print(df)
   organization_lyft_id
0                   NaN
1          1.239162e+18
2                   NaN
3                   NaN
4                   NaN
5                   NaN
>>> print(df.dtypes)
organization_lyft_id    float64
dtype: object

The number then shows up as<PHONE_NUMBER>494753800 in SQL Lab.
Here's the Pandas documentation on this:

... pandas primarily uses NaN to represent missing data. Because NaN is a float, this forces an array of integers with any missing values to become floating point. In some cases, this may not matter much. But if your integer column is, say, an identifier, casting to float can be problematic. Some integers cannot even be represented as floating point numbers. (emphasis mine)

Note that if the missing data is filtered the value is inferred as an int64, and it shows up correctly in SQL Lab:
>>> column_names = ['organization_lyft_id']
>>> data = [(1239162456494753670,)]
>>> df = pd.DataFrame(list(data), columns=column_names).infer_objects()  # SupersetDataFrame
>>> print(df)
   organization_lyft_id
0<PHONE_NUMBER>494753670
>>> print(df.dtypes)
organization_lyft_id    int64
dtype: object

The solution is to pass a dtype argument when creating the Pandas data frame, built from the cursor description. I'm working on a fix for this.

I've been wrestling with something similar lately (unrelated data wrangling), and ended up having to bypass pandas completely, as having Nones in columns messed up the dtypes (got exceptions when trying to force them in afterwards). Not sure if this will be solvable with the current stable pandas version (apparently they introduced better nulling support in 0.24), but keeping fingers crossed these things get better support soon (guessing arrow will supercede pandas for this type of data processing).

I was able to fix this by passing a dtype constructed based on the cursor description, but then PyArrow fails to serialize the resulting Pandas dataframe, sigh:
https://github.com/apache/arrow/issues/4168

This is still an issue for non-Presto databases.

Support for PyArrow serialization of Pandas Int64 dtypes is currently merged to master in both repos, but not yet released on PyPi:
https://github.com/pandas-dev/pandas/commit/34fff1f336d3b083dd09f5036c2bb9b80edfb619
https://github.com/apache/arrow/commit/7f4165c4757be6e53bdf80d5df3119bbe1ae6c54
Also requires converting the pandas Dataframe to an arrow Table prior to serialization:
table = pa.Table.from_pandas(cdf.raw_df)
data = (
   pa.default_serialization_context()
   .serialize(table)
   .to_buffer()
   .to_pybytes()
)

We noticed an issue with the the Numpy reshaping logic in SQL Lab. Here labels is an ARRAY<STRING> and renders correctly if multiple columns are selected but it incorrectly reshaped if it's the only column.


Guidance/component for hint text needed

Feature Request

[ ] I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
[ ] I’ve read and agree to the Code of Conduct.
[ ] I’ve searched for any related issues and avoided creating a duplicate issue.
[ ] I've searched the community forums to check for related issues or feature requests

I'd like to request that guidance on hint text for from controls is added to the design system. This is a commonly needed feature and it would be great to have consistency and predictability.
Some things to consider:

visual location of hint text for form controls and for group of form controls
when/if short hint text should be part of the form label
associating hint text with form control for screen readers

Hey @sarahpulis thanks for bringing this up! I'm going to merge this ticket with #623 😄


GML 3.2 with multipe featuretypes not parsed correctly

Version
ol: 6.5.0
wfs: 2.0.0
gml: 3.2
Describe the bug
ol.format.WFS doesn't read features from GML in version 3.2, as soon as there is more than one featuretype returned. I think this is due to the fact, that the xml node <wfs:member> contains another <wfs:FeatureCollection> node.
To Reproduce
Live Example (with fake requests)

Query a WFS Server (version 2.0.0) with a GetFeature Request and multiple typenames. Example: http://mapserver?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=typeA,typeB&bbox=2618074,1170296,2618078,1170299
Try to parse the response with ol.format.WFS:const parser = new WFS({
    featureNS: 'http://mapserver.gis.umn.edu/mapserver',
    featureType: ['typeA', 'typeB'],
    version: '2.0.0'
});
const features = parser.readFeatures(response);

constant features will be an empty array instead of multiple features.

Expected behavior
All featuretypes should be parseable by ol.format.WFS, as long they are defined as featureType option in the ol.format.WFS constructor.

For now I've written a temporary solution in typescript. The class extends the original ol.format.WFS and only changes the way of reading features if the format is ol.format.GML32 and the wfs response has nested feature collections. Perhaps it may lead into the right direction.
import { Feature } from 'ol';
import { WFS as OlWFS } from 'ol/format';
import { ReadOptions } from 'ol/format/Feature';
import { Options } from 'ol/format/WFS';
import Geometry from 'ol/geom/Geometry';
import GML2 from 'ol/format/GML2';
import GML3 from 'ol/format/GML3';
import GML32 from 'ol/format/GML32';

/**
 * WFS parser
 *
 * Extends ol.format.WFS to be able to read nested
 * feature collections in GML32. Can be removed later,
 * when the problem is resolved in ol.
 *
 * https://github.com/openlayers/openlayers/issues/12389
 */
export class WFS extends OlWFS {

    protected gmlFormat_: GML2 | GML3 | GML32;

    constructor(opt_options?: Options) {
        super(opt_options);
    }

    readFeatures(source: Document | Element | object | string, opt_options?: ReadOptions): Feature<Geometry>[] {
        if (this.gmlFormat_ instanceof GML32) {
            return this.readFeaturesGML32(source, opt_options);
        } else {
            return super.readFeatures(source, opt_options);
        }
    }

    private readFeaturesGML32(source: Document | Element | object | string, opt_options?: ReadOptions): Feature<Geometry>[] {
        let doc: Document = null;
        if (source instanceof Document) {
            doc = source;
        } else if (typeof source === 'string') {
            const domParser = new DOMParser();
            doc = domParser.parseFromString(source as string, 'application/xml');
        } else {
            console.warn('Source for GML3.2 not supported!');
            return [];
        }

        let features: Feature<Geometry>[] = [];
        if (this.hasNestedFeatureCollectionsGML32(doc)) {
            features = this.readNestedFeatureCollectionsGML32(doc, opt_options);
        } else {
            features = super.readFeatures(doc.documentElement, opt_options);
        }

        return features instanceof Array ? features : [];
    }

    private readNestedFeatureCollectionsGML32(doc: Document, opt_options?: ReadOptions): Feature<Geometry>[] {
        let features: Feature<Geometry>[] = [];
        const children = doc.documentElement.children;
        let i = 0;
        while (i < children.length) {
            const child = children.item(i);
            if (
                child.localName === 'member' &&
                child.children.length &&
                child.children.item(0).localName === 'FeatureCollection') {
                const collection = child.children.item(0);
                if (collection.children?.length) {
                    features = features.concat(super.readFeatures(collection, opt_options));
                }
            }
            i++;
        }
        return features;
    }

    private hasNestedFeatureCollectionsGML32(doc: Document): boolean {
        const children = doc.documentElement.children;
        let member: Element = null;
        let i = 0;

        while (i < children.length) {
            const child = children.item(i);
            if (child.localName === 'member') {
                member = child;
                break;
            }
            i++;
        }

        return member?.children?.length && member.children.item(0).localName === 'FeatureCollection';
    }
}

Any update on this issue?
I'm using OL v8.2 and it still doesn't seem to parse WFS v2.0 / GML v3.2 correctly, whereas WFS v1.1 / GML v3 works immediately.


Update auth, dynamodb, s3, sqs to 2.17.103

Updates

software.amazon.awssdk:auth
software.amazon.awssdk:dynamodb
software.amazon.awssdk:s3
software.amazon.awssdk:sqs

from 2.17.66 to 2.17.103.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "software.amazon.awssdk" } ]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Superseded by #794.


Emulate controller?

Is it possible to use this to emulate pressing an XInput button and such instead of reacting to it?

Do you mean to generate button presses so that other applications could capture them (similar to java.awt.Robot)? That is not the goal of JXInput; it's meant to be an XInput wrapper, so it can only do whatever XInput allows. It's not a controller emulator, and will never be.
If you are trying to emulate button presses within your application with the purposes of testing, you could simply override the values of the desired public fields from XInputButtons or XInputAxes right after polling, like this:
XInputDevice device = ...;
device.poll();
// override values for testing purposes
XInputButtons buttons = device.getComponents().getButtons();
buttons.a = true;
buttons.x = true;


Support for paging using az devops invoke when continuation token is in header

Example command:
az devops invoke --area distributedtask --resource jobrequests --route-parameters poolId={myPoolId} --organization {myOrg} --query-parameters `$top=1

will translation to the following URL:
{myOrg}/_apis/distributedtask/pools/{myPoolId}/jobrequests?$top=1

This works as expected and returns a JSON response to the console. The problem is that, if I need to get to the next page, the server sends the continuation token as a header instead of embedded in the JSON body response and az devops invoke doesn't expose response headers at all, that I can see.

Looks like API do not support continuation token.
@Tiberriver256
Can you please check

Hi roshan, sorry for the confusion. Could you use the build definitions list endpoint as an example?
https://docs.microsoft.com/en-us/rest/api/azure/devops/build/definitions/list?view=azure-devops-rest-6.0
There are several endpoints that use the continuation token in the header as a paging mechanism so I can pick another if you like.

Fixed.
Will be available after next release.


launch on deno

ala https://github.com/dprint/automation/blob/main/tasks/publish_release.ts

link a submodule tasks as well


add LS990 (Spring LG G3) to udev rules

Thanks for your PR!
Consider updating lglaf.lua too (Wireshark dissector). Do you have a packet capture for testing? Did lglaf.py work for you?


receiveResponse function does not work when response is empty (i.e a head request)

when I make a head request to a server the body that I receive is empty so the receiveResponse function does not work (it waits for a long time for the end of file, but there is none).

the server that I make the call to is Snap. I checked the code and it appears that the code gets stuck here https://hackage.haskell.org/package/http-streams-<IP_ADDRESS>/docs/src/Network-Http-Connection.html#receiveResponse at line Streams.skipToEof i' . It gets stuck there for some reason.

I'm going to look at this, obviously, but I don't suppose you have a URL you're hitting that you could give to let us test against?

@afcowie
Unfortunately I cannot setup a server, I test it on my localhost.

@miladz68 Ok. I was only asking because "can I see for myself" sounded a little better than "can you write a test case which demonstrates the problem?" But if the target server is written in Snap, then you could certainly write a test case into the http-streams test suite. If you do a pull request with that (failing) test I'll take it from there.


How can I import in Typescript ES6?

import * as ACL from 'acl2';

npm install acl2 has successfully finished but I can't import the module.
Every examples in repository are written in ES5 grammar. How can I use it in TypeScript ES6?

TypeScript usage:
var ACL: any = require("acl2");

Tell me how it goes.


How can i grey out custom dates in a fast and efficient way, it would be nice to have this feature, i added a delegate to check the dayView for days and grey out those days, I also would like to have no user interaction on the grey out dates

[ ] I have verified there are no duplicate active or recent bugs, questions, or requests
[ ] I have verified that I am using the latest version of CVCalendar.
[ ] I have given my issue a non-generic title.

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

Version used (Cocoapods spec):
Device used i.e. iPhone 6S:
Physical device (y/n):
Link to your project (if available):

never mind i figured it out

Hi arbidh,
Could you please explain how you figued it out?
Kerim


async function inside evaluate fails

Code
await page.evaluate(async () => {
    console.log('1')
})

Error
(node:66796) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Evaluation failed: ReferenceError: fn is not defined
    at <anonymous>:1:26

I cannot reproduce with this code and puppeteer v1.0.0-rc on Windows 7 x64:
'use strict';

const puppeteer = require('puppeteer');

(async function main() {
  try {
    const browser = await puppeteer.launch();
    const page = await browser.newPage();

    await page.goto('https://example.org/');

    await page.evaluate(async () => {
      console.log('1');
    });

    await browser.close();
  } catch (err) {
    console.error(err);
  }
})();

Can you provide your configuration and a runnable code fragment with this issue?

puppeteer v1.0.0-rc ( git://github.com/GoogleChrome/puppeteer.git#fc2fc0d ) centos-release-7-3.1611.el7.centos.x86_64
const puppeteer = require('puppeteer');

(async function main() {
  try {
    const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
    const page = await browser.newPage();

    await page.goto('https://example.org/');

    await page.evaluate(async () => {
      console.log('1');
    });

    await browser.close();
  } catch (err) {
    console.error(err);
  }
})();

Error: Evaluation failed: ReferenceError: fn is not defined
    at <anonymous>:1:26
    at ExecutionContext.evaluateHandle (/usr/local/goibibo/source/communitybot/v2/chatbot/node_modules/puppeteer/lib/ExecutionContext.js:70:13)
    at <anonymous>
    at process._tickDomainCallback [as _tickCallback] (internal/process/next_tick.js:228:7)

Can anybody reproduce on centos?

I'm able to reproduce the same on Mac OS Sierra

@bhoomit what's your node.js version and what version of chromium do you run with puppeteer?

Are you transforming your code with babel? The babel async function code isn't compatible with Puppeteer. We call function.toString and send your code into Chromium, but babel messes with that and we end up sending an incomplete string. You can get around this by using template strings instead of functions.
await page.evaluate(`(async() => {
   console.log('1');
})()`);

@JoelEinbinder
It's good to know. May I make a PR to add the message to the docs?

@JoelEinbinder, just wonder if 1 from console log within a template literal will be printed?
In my code snippet below, I have 2 console logs but I can see browser version in my terminal from await browser.version()
describe(('window should contain fnA'), () => {
  let browser;
  // puppeteer options
  const puppeteerOpts = {
    headless: true,
    slowMo: 100,
    timeout: 10000,
    // dumpio: true,
  };
  before(async () => {
    browser = await puppeteer.launch(puppeteerOpts);
  });

  after(async () => {
    await browser.close();
  });
  it('should evaluate fnA', async () => {
    console.log(await browser.version());
    const page = await browser.newPage();
    await page.goto('http://localhost:8000');
    expect(await page.title()).to.equal('pageTitle');
    await page.evaluate(`(async () => {
      console.log('1');
    })()`);
  }).timeout('15s');
});

 "devDependencies": {
    "babel-core": "^6.26.0",
    "babel-eslint": "^8.2.1",
    "babel-loader": "^7.1.2",
    "babel-plugin-istanbul": "^4.1.5",
    "babel-polyfill": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "babel-register": "^6.26.0",
    "chai": "^4.1.2",
    "commitizen": "^2.9.6",
    "coveralls": "^3.0.0",
    "cross-env": "^5.1.3",
    "cz-conventional-changelog": "^2.1.0",
    "eslint": "^4.17.0",
    "eslint-config-airbnb-base": "^12.1.0",
    "eslint-plugin-import": "^2.8.0",
    "fetch-mock": "^6.0.0",
    "isomorphic-fetch": "^2.2.1",
    "lodash": "^4.17.5",
    "mocha": "^5.0.0",
    "nyc": "10",
    "puppeteer": "^1.1.1",
    "semantic-release": "^12.4.1",
    "sinon": "^4.3.0",
    "webpack": "^3.11.0",
    "webpack-dev-server": "^2.11.1"
  },

@JoelEinbinder Hi~ How can I pass arguments into template string functions? If I want to test an util object, which has a parseUrl method, I would like to write util.test.js like this:
import assert from 'assert'
import puppeteer from 'puppeteer'
import util from '../src/util'

describe('util.js', () => {
  let browser
  let page
  before(async () => {
    browser = await puppeteer.launch()
    page = await browser.newPage()
  })
  after(async () => {
    await browser.close()
  })
  describe('#parseUrl()', () => {
    it('port should be 8080', async () => {
      const result = await page.evaluate(`((x) => x.parseUrl("https://www.example.com:8080/test?q=1&p=2#you_and_me"))(${util})`)
      assert(result.port === '8080')
    })
  })
})

But the console just says Error: Evaluation failed: SyntaxError: Unexpected identifier. How can I solve this?
Thank you in advance.

You can't import something from Node and use it in Chromium. You have to navigate Chromium to a webpage that includes your utility script.

same issue, different error, using TypeScript (not babel)
while the following works ok:
    let result = await page.evaluate( ()=>{
      return Promise.resolve('hello')
    })

the equivalent code using async functions throws the following error:
    let result = await page.evaluate(async ()=>{
      return 'hello'
    })

Error:
  Message:
    Error: Evaluation failed: ReferenceError: __awaiter is not defined
        at __puppeteer_evaluation_script__:1:8
  Stack:
    Error: Evaluation failed: ReferenceError: __awaiter is not defined
        at __puppeteer_evaluation_script__:1:8
        at ExecutionContext.evaluateHandle (/home/sg/git/autumn-leaves/imagemagick-browser/node_modules/puppeteer/lib/ExecutionContext.js:106:13)
        at process._tickCallback (internal/process/next_tick.js:68:7)
        at <Jasmine>
        at ExecutionContext.<anonymous> (/home/sg/git/autumn-leaves/imagemagick-browser/node_modules/puppeteer/lib/helper.js:144:27)
        at ExecutionContext.evaluate (/home/sg/git/autumn-leaves/imagemagick-browser/node_modules/puppeteer/lib/ExecutionContext.js:58:31)
        at ExecutionContext.<anonymous> (/home/sg/git/autumn-leaves/imagemagick-browser/node_modules/puppeteer/lib/helper.js:145:23)
        at Frame.evaluate (

@JoelEinbinder the fact that toString() is called on the 1st arg there should maybe be noted in the docs.
This caused a lot of confusion for me when I tried to use shorthand for defining a func in an object then using that function as the 1st arg in page.evaluate
breaks
module.exports = {
  scrape() { return document.querySelector('body'); },
}

works
module.exports = {
  scrape: function () { return document.querySelector('body'); },
}

await page.evaluate(require('./some-file').scrape);

@jtara1: we made our serialization logic more clever so that it doesn't bite you next time. We'll update our docs to explain the function serialization.

Are you transforming your code with babel? The babel async function code isn't compatible with Puppeteer. We call function.toString and send your code into Chromium, but babel messes with that and we end up sending an incomplete string. You can get around this by using template strings instead of functions.
await page.evaluate(`(async() => {
   console.log('1');
})()`);

Hi, I'm trying to use with Echart library to generate and get its based64 image.
    await page.addScriptTag({path: __dirname + '/echarts-all.js'});
    await page.setContent(`

  `);
   const base64img = await page.evaluate(`(async() => { myChart.getDataURL(); })()`);
   console.log('base64img', base64img);

However the base64img is undefined.
Is there any solution to make it works perfectly with Babel?

@reservce - This solution works great! But I agree, it's obviously not a true solution (after all, a template string is technically just a string, though it will get eval'ed as actual code...)
As a side question: How did you know to do this, or figure out how to do this?


raspberrypi: RuntimeError: Error accessing GPIO.

Hi,
I'm struggling with getting the docker container to access the GPIO. I'm running a raspberry pi 3B+ with raspbian. I've attached a AM2302 on pin 4 and configured pi-mqtt-gpio as follow:
mqtt:
  host: <IP_ADDRESS>
  port: 8883
  tls:
    enabled: yes
    cert_reqs: CERT_NONE
    insecure: yes
  user: "rpi"
  password: "FXHucuGYBy7kHR3MtN"
  topic_prefix: home/wohnzimmer

gpio_modules:
  - name: raspberrypi
    module: raspberrypi
    cleanup: no

sensor_modules:
  - name: dht22
    module: dht22
    type: AM2302 # can be  DHT11, DHT22 or AM2302
    pin: 4

sensor_inputs:
  - name: dht22_temperature
    module: dht22
    interval: 4 #interval in seconds, that a value is read from the sensor and a update is published
    digits: 2 # number of digits to be round
    type: temperature # Can be temperature or humidity

  - name: dht22_humidity
    module: dht22
    interval: 4 #interval in seconds, that a value is read from the sensor and a update is published
    digits: 2 # number of digits to be round
    type: humidity # Can be temperature or humidity
logging:
  version: 1
  formatters:
    simple:
      format: "%(asctime)s %(name)s (%(levelname)s): %(message)s"
  handlers:
    console:
      class: logging.StreamHandler
      level: DEBUG
      formatter: simple
      stream: ext://sys.stdout
  loggers:
    mqtt_gpio:
      level: DEBUG
      handlers: [console]
      propagate: yes

This is the output of the container and the log (I've killed the container with CTRL-C):
pi@raspberrypi:~ $ docker run --name="mqtt-gpio" -e GROUP_ID=997 --privileged -v /sys:/sys -v /home/pi/docker/mqtt-gpio/config.yml:/config.yml -v /etc/localtime:/etc/localtime:ro flyte/mqtt-gpio:armv7l
2020-05-17 23:05:06,062 mqtt_gpio (INFO): Startup
2020-05-17 23:05:06,738 mqtt_gpio (DEBUG): Last will set on 'home/wohnzimmer/status' as 'dead'.
Collecting RPi.GPIO
  Downloading RPi.GPIO-0.7.0.tar.gz (30 kB)
Building wheels for collected packages: RPi.GPIO
  Building wheel for RPi.GPIO (setup.py): started
  Building wheel for RPi.GPIO (setup.py): finished with status 'done'
  Created wheel for RPi.GPIO: filename=RPi.GPIO-0.7.0-cp36-cp36m-linux_armv7l.whl size=61774 sha256=f80cdc287689b7badb02dd13fc9207db797bec8e42c739dedf000cb47f2c4a66
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/84/c0/d6/73a6e9f98b9d29edd7c6e981dce47852c3321f34518c80dce1
Successfully built RPi.GPIO
Installing collected packages: RPi.GPIO
Successfully installed RPi.GPIO-0.7.0
Collecting Adafruit_DHT
  Downloading Adafruit_DHT-1.4.0.tar.gz (15 kB)
Building wheels for collected packages: Adafruit-DHT
  Building wheel for Adafruit-DHT (setup.py): started
  Building wheel for Adafruit-DHT (setup.py): finished with status 'done'
  Created wheel for Adafruit-DHT: filename=Adafruit_DHT-1.4.0-cp36-cp36m-linux_armv7l.whl size=30318 sha256=f2113af4b4610a647e995f6293a05f882b74f0e3d6cd87b810dcdb747dfe8350
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/af/d8/00/6f0c819ab5f38ea5ececf1b698a9e53888e271300d5f202260
Successfully built Adafruit-DHT
Installing collected packages: Adafruit-DHT
Successfully installed Adafruit-DHT-1.4.0
2020-05-17 23:05:38,608 mqtt_gpio (DEBUG): MQTT client: Sending CONNECT (u1, p1, wr1, wq1, wf1, c0, k60) client_id=b'pi-mqtt-gpio-cd95fea6685fdba5f9bbd3d2d4b76d9db771cfc2'
2020-05-17 23:05:38,611 mqtt_gpio (DEBUG): sensor_timer_thread: calculated cycle_time will be 4 seconds
2020-05-17 23:05:38,612 mqtt_gpio (DEBUG): MQTT client: Received CONNACK (1, 0)
2020-05-17 23:05:38,613 mqtt_gpio (INFO): Connected to the MQTT broker with protocol v3.1.1.
2020-05-17 23:05:38,613 mqtt_gpio (DEBUG): MQTT client: Sending PUBLISH (d0, q1, r1, m1), 'b'home/wohnzimmer/status'', ... (7 bytes)
2020-05-17 23:05:38,619 mqtt_gpio (DEBUG): MQTT client: Received PUBACK (Mid: 1)
2020-05-17 23:06:38,700 mqtt_gpio (DEBUG): MQTT client: Sending PINGREQ
2020-05-17 23:06:38,704 mqtt_gpio (DEBUG): MQTT client: Received PINGRESP
2020-05-17 23:07:38,788 mqtt_gpio (DEBUG): MQTT client: Sending PINGREQ
2020-05-17 23:07:38,791 mqtt_gpio (DEBUG): MQTT client: Received PINGRESP
^C
2020-05-17 23:08:13,603 mqtt_gpio (DEBUG): MQTT client: Sending PUBLISH (d0, q1, r1, m2), 'b'home/wohnzimmer/status'', ... (7 bytes)
2020-05-17 23:08:13,610 mqtt_gpio (DEBUG): MQTT client: Received PUBACK (Mid: 2)
2020-05-17 23:08:13,613 mqtt_gpio (DEBUG): MQTT client: Sending DISCONNECT
2020-05-17 23:08:13,616 mqtt_gpio (INFO): Cleanup disabled for module 'raspberrypi'.
Exception in thread pi-mqtt-gpio_SensorReader:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 612, in sensor_timer_thread
    value = sensor.get_value(sens_conf)
  File "/home/mqttgpio/pi_mqtt_gpio/modules/dht22.py", line 49, in get_value
    humidity, temperature = self.sensor.read_retry(self.sensor_type, self.pin)
  File "/home/mqttgpio/.local/share/virtualenvs/mqttgpio-815CbdL_/lib/python3.6/site-packages/Adafruit_DHT/common.py", line 94, in read_retry
    humidity, temperature = read(sensor, pin, platform)
  File "/home/mqttgpio/.local/share/virtualenvs/mqttgpio-815CbdL_/lib/python3.6/site-packages/Adafruit_DHT/common.py", line 81, in read
    return platform.read(sensor, pin)
  File "/home/mqttgpio/.local/share/virtualenvs/mqttgpio-815CbdL_/lib/python3.6/site-packages/Adafruit_DHT/Raspberry_Pi_2.py", line 34, in read
    raise RuntimeError('Error accessing GPIO.')
RuntimeError: Error accessing GPIO.

I'm out of ideas. Could someone help me out?
Best regards
Mirko

Hi, you do have the problem with all gpios or only via dht22/Adafruit lib?

I've just tried adding an normal pin as output, but even with passing an additional device I get another kind of error:
[...]
digital_outputs:
  - name: led
    module: raspberrypi
    pin: 18
    on_payload: "ON"
    off_payload: "OFF"
    initial: low
[...]

pi@raspberrypi:~ $ docker run --name="mqtt-gpio" --privileged --device /dev/mem --device /dev/gpiomem --device /dev/i2c-1 -v /home/pi/docker/mqtt-gpio/config.yml:/config.yml -v /etc/localtime:/etc/localtime:ro flyte/mqtt-gpio:armv7l
2020-05-18 22:16:37,346 mqtt_gpio (INFO): Startup
2020-05-18 22:16:38,021 mqtt_gpio (DEBUG): Last will set on 'home/wohnzimmer/status' as 'dead'.
Collecting RPi.GPIO
  Downloading RPi.GPIO-0.7.0.tar.gz (30 kB)
Building wheels for collected packages: RPi.GPIO
  Building wheel for RPi.GPIO (setup.py): started
  Building wheel for RPi.GPIO (setup.py): finished with status 'done'
  Created wheel for RPi.GPIO: filename=RPi.GPIO-0.7.0-cp36-cp36m-linux_armv7l.whl size=61793 sha256=66134c6ff5dc2712bbc79535676f79730c3aa32feb47caf5ef6d5e9176f65b42
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/84/c0/d6/73a6e9f98b9d29edd7c6e981dce47852c3321f34518c80dce1
Successfully built RPi.GPIO
Installing collected packages: RPi.GPIO
Successfully installed RPi.GPIO-0.7.0
Collecting Adafruit_DHT
  Downloading Adafruit_DHT-1.4.0.tar.gz (15 kB)
Building wheels for collected packages: Adafruit-DHT
  Building wheel for Adafruit-DHT (setup.py): started
  Building wheel for Adafruit-DHT (setup.py): finished with status 'done'
  Created wheel for Adafruit-DHT: filename=Adafruit_DHT-1.4.0-cp36-cp36m-linux_armv7l.whl size=30317 sha256=5d34264809782db299aa4fe389928e961591baea99f64ccc20c976e68ef4090d
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/af/d8/00/6f0c819ab5f38ea5ececf1b698a9e53888e271300d5f202260
Successfully built Adafruit-DHT
Installing collected packages: Adafruit-DHT
Successfully installed Adafruit-DHT-1.4.0
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 901, in <module>
    main(args)
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 802, in main
    initialise_digital_output(out_conf, GPIO_MODULES[out_conf["module"]])
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 540, in initialise_digital_output
    gpio.setup_pin(out_conf["pin"], PinDirection.OUTPUT, None, out_conf)
  File "/home/mqttgpio/pi_mqtt_gpio/modules/raspberrypi.py", line 47, in setup_pin
    self.io.setup(pin, direction, pull_up_down=pullup, initial=initial)
RuntimeError: No access to /dev/mem.  Try running as root!

docker run --name="mqtt-gpio" --privileged --device /dev/mem --device /dev/gpiomem

https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities says, that you can use --device, if you don't want to use --privileged. May you check one without the other: just --privileged or --device=?
syntax on help page, looks different:
docker run --device=/dev/sda:/dev/xvdc

I've just tried only with --privileged and another try specifying the devices with the syntax from the linked documentation. No luck at all:
root@raspberrypi:~# docker run --name="mqtt-gpio" --privileged -v /home/pi/docker/mqtt-gpio/config.yml:/config.yml -v /etc/localtime:/etc/localtime:ro flyte/mqtt-gpio:armv7l
2020-05-19 22:21:23,774 mqtt_gpio (INFO): Startup
2020-05-19 22:21:25,507 mqtt_gpio (DEBUG): Last will set on 'home/wohnzimmer/status' as 'dead'.
Collecting RPi.GPIO
  Downloading RPi.GPIO-0.7.0.tar.gz (30 kB)
Building wheels for collected packages: RPi.GPIO
  Building wheel for RPi.GPIO (setup.py): started
  Building wheel for RPi.GPIO (setup.py): finished with status 'done'
  Created wheel for RPi.GPIO: filename=RPi.GPIO-0.7.0-cp36-cp36m-linux_armv7l.whl size=61764 sha256=250e4ed1ce647e6958e2f2851eec2bc97ba6cf26832b60139fe9e9c84fb05461
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/84/c0/d6/73a6e9f98b9d29edd7c6e981dce47852c3321f34518c80dce1
Successfully built RPi.GPIO
Installing collected packages: RPi.GPIO
Successfully installed RPi.GPIO-0.7.0
Collecting Adafruit_DHT
  Downloading Adafruit_DHT-1.4.0.tar.gz (15 kB)
Building wheels for collected packages: Adafruit-DHT
  Building wheel for Adafruit-DHT (setup.py): started
  Building wheel for Adafruit-DHT (setup.py): finished with status 'done'
  Created wheel for Adafruit-DHT: filename=Adafruit_DHT-1.4.0-cp36-cp36m-linux_armv7l.whl size=30333 sha256=3f7313bdb7fae4f2503c69df3377a3088bfb5275940ebb379ea4be24896c2888
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/af/d8/00/6f0c819ab5f38ea5ececf1b698a9e53888e271300d5f202260
Successfully built Adafruit-DHT
Installing collected packages: Adafruit-DHT
Successfully installed Adafruit-DHT-1.4.0
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 901, in <module>
    main(args)
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 802, in main
    initialise_digital_output(out_conf, GPIO_MODULES[out_conf["module"]])
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 540, in initialise_digital_output
    gpio.setup_pin(out_conf["pin"], PinDirection.OUTPUT, None, out_conf)
  File "/home/mqttgpio/pi_mqtt_gpio/modules/raspberrypi.py", line 47, in setup_pin
    self.io.setup(pin, direction, pull_up_down=pullup, initial=initial)
RuntimeError: No access to /dev/mem.  Try running as root!

root@raspberrypi:~# docker run --name="mqtt-gpio" --device /dev/mem:/dev/mem --device /dev/gpiomem:/dev/gpiomem --device /dev/i2c-1:/dev/i2c-1 -v /home/pi/docker/mqtt-gpio/config.yml:/config.yml -v /etc/localtime:/etc/localtime:ro flyte/mqtt-gpio:armv7l
2020-05-19 22:32:26,060 mqtt_gpio (INFO): Startup
2020-05-19 22:32:27,430 mqtt_gpio (DEBUG): Last will set on 'home/wohnzimmer/status' as 'dead'.
Collecting RPi.GPIO
  Downloading RPi.GPIO-0.7.0.tar.gz (30 kB)
Building wheels for collected packages: RPi.GPIO
  Building wheel for RPi.GPIO (setup.py): started
  Building wheel for RPi.GPIO (setup.py): finished with status 'done'
  Created wheel for RPi.GPIO: filename=RPi.GPIO-0.7.0-cp36-cp36m-linux_armv7l.whl size=61783 sha256=2b09aa35b6c22e49825b250cf1a309918dc1139e3bfc5efd42c977aa252f01de
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/84/c0/d6/73a6e9f98b9d29edd7c6e981dce47852c3321f34518c80dce1
Successfully built RPi.GPIO
Installing collected packages: RPi.GPIO
Successfully installed RPi.GPIO-0.7.0
Collecting Adafruit_DHT
  Downloading Adafruit_DHT-1.4.0.tar.gz (15 kB)
Building wheels for collected packages: Adafruit-DHT
  Building wheel for Adafruit-DHT (setup.py): started
  Building wheel for Adafruit-DHT (setup.py): finished with status 'done'
  Created wheel for Adafruit-DHT: filename=Adafruit_DHT-1.4.0-cp36-cp36m-linux_armv7l.whl size=30320 sha256=35500c891345e234538200a35ed94e0b40411c7a3fc94efad754f3310c56f02a
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/af/d8/00/6f0c819ab5f38ea5ececf1b698a9e53888e271300d5f202260
Successfully built Adafruit-DHT
Installing collected packages: Adafruit-DHT
Successfully installed Adafruit-DHT-1.4.0
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 901, in <module>
    main(args)
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 802, in main
    initialise_digital_output(out_conf, GPIO_MODULES[out_conf["module"]])
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 540, in initialise_digital_output
    gpio.setup_pin(out_conf["pin"], PinDirection.OUTPUT, None, out_conf)
  File "/home/mqttgpio/pi_mqtt_gpio/modules/raspberrypi.py", line 47, in setup_pin
    self.io.setup(pin, direction, pull_up_down=pullup, initial=initial)
RuntimeError: No access to /dev/mem.  Try running as root!

I've just tried only with --privileged and another try specifying the devices with the syntax from the linked documentation. No luck at all:
root@raspberrypi:~# docker run --name="mqtt-gpio" --privileged -v /home/pi/docker/mqtt-gpio/config.yml:/config.yml -v /etc/localtime:/etc/localtime:ro flyte/mqtt-gpio:armv7l
2020-05-19 22:21:23,774 mqtt_gpio (INFO): Startup
2020-05-19 22:21:25,507 mqtt_gpio (DEBUG): Last will set on 'home/wohnzimmer/status' as 'dead'.
Collecting RPi.GPIO
  Downloading RPi.GPIO-0.7.0.tar.gz (30 kB)
Building wheels for collected packages: RPi.GPIO
  Building wheel for RPi.GPIO (setup.py): started
  Building wheel for RPi.GPIO (setup.py): finished with status 'done'
  Created wheel for RPi.GPIO: filename=RPi.GPIO-0.7.0-cp36-cp36m-linux_armv7l.whl size=61764 sha256=250e4ed1ce647e6958e2f2851eec2bc97ba6cf26832b60139fe9e9c84fb05461
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/84/c0/d6/73a6e9f98b9d29edd7c6e981dce47852c3321f34518c80dce1
Successfully built RPi.GPIO
Installing collected packages: RPi.GPIO
Successfully installed RPi.GPIO-0.7.0
Collecting Adafruit_DHT
  Downloading Adafruit_DHT-1.4.0.tar.gz (15 kB)
Building wheels for collected packages: Adafruit-DHT
  Building wheel for Adafruit-DHT (setup.py): started
  Building wheel for Adafruit-DHT (setup.py): finished with status 'done'
  Created wheel for Adafruit-DHT: filename=Adafruit_DHT-1.4.0-cp36-cp36m-linux_armv7l.whl size=30333 sha256=3f7313bdb7fae4f2503c69df3377a3088bfb5275940ebb379ea4be24896c2888
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/af/d8/00/6f0c819ab5f38ea5ececf1b698a9e53888e271300d5f202260
Successfully built Adafruit-DHT
Installing collected packages: Adafruit-DHT
Successfully installed Adafruit-DHT-1.4.0
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 901, in <module>
    main(args)
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 802, in main
    initialise_digital_output(out_conf, GPIO_MODULES[out_conf["module"]])
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 540, in initialise_digital_output
    gpio.setup_pin(out_conf["pin"], PinDirection.OUTPUT, None, out_conf)
  File "/home/mqttgpio/pi_mqtt_gpio/modules/raspberrypi.py", line 47, in setup_pin
    self.io.setup(pin, direction, pull_up_down=pullup, initial=initial)
RuntimeError: No access to /dev/mem.  Try running as root!

root@raspberrypi:~# docker run --name="mqtt-gpio" --device /dev/mem:/dev/mem --device /dev/gpiomem:/dev/gpiomem --device /dev/i2c-1:/dev/i2c-1 -v /home/pi/docker/mqtt-gpio/config.yml:/config.yml -v /etc/localtime:/etc/localtime:ro flyte/mqtt-gpio:armv7l
2020-05-19 22:32:26,060 mqtt_gpio (INFO): Startup
2020-05-19 22:32:27,430 mqtt_gpio (DEBUG): Last will set on 'home/wohnzimmer/status' as 'dead'.
Collecting RPi.GPIO
  Downloading RPi.GPIO-0.7.0.tar.gz (30 kB)
Building wheels for collected packages: RPi.GPIO
  Building wheel for RPi.GPIO (setup.py): started
  Building wheel for RPi.GPIO (setup.py): finished with status 'done'
  Created wheel for RPi.GPIO: filename=RPi.GPIO-0.7.0-cp36-cp36m-linux_armv7l.whl size=61783 sha256=2b09aa35b6c22e49825b250cf1a309918dc1139e3bfc5efd42c977aa252f01de
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/84/c0/d6/73a6e9f98b9d29edd7c6e981dce47852c3321f34518c80dce1
Successfully built RPi.GPIO
Installing collected packages: RPi.GPIO
Successfully installed RPi.GPIO-0.7.0
Collecting Adafruit_DHT
  Downloading Adafruit_DHT-1.4.0.tar.gz (15 kB)
Building wheels for collected packages: Adafruit-DHT
  Building wheel for Adafruit-DHT (setup.py): started
  Building wheel for Adafruit-DHT (setup.py): finished with status 'done'
  Created wheel for Adafruit-DHT: filename=Adafruit_DHT-1.4.0-cp36-cp36m-linux_armv7l.whl size=30320 sha256=35500c891345e234538200a35ed94e0b40411c7a3fc94efad754f3310c56f02a
  Stored in directory: /home/mqttgpio/.cache/pip/wheels/af/d8/00/6f0c819ab5f38ea5ececf1b698a9e53888e271300d5f202260
Successfully built Adafruit-DHT
Installing collected packages: Adafruit-DHT
Successfully installed Adafruit-DHT-1.4.0
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 901, in <module>
    main(args)
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 802, in main
    initialise_digital_output(out_conf, GPIO_MODULES[out_conf["module"]])
  File "/home/mqttgpio/pi_mqtt_gpio/server.py", line 540, in initialise_digital_output
    gpio.setup_pin(out_conf["pin"], PinDirection.OUTPUT, None, out_conf)
  File "/home/mqttgpio/pi_mqtt_gpio/modules/raspberrypi.py", line 47, in setup_pin
    self.io.setup(pin, direction, pull_up_down=pullup, initial=initial)
RuntimeError: No access to /dev/mem.  Try running as root!

same issue for me

Same.

https://hub.docker.com/r/ebekebe/mqtt-gpio/ runs.

I am having a similar issue but I am trying to run a python script with a php file. Whenever I try to run it i get RuntimeError: No access to /dev/mem. Try running as root!. I am using apache2 to run a webserver and i have setup then index.php file to run a simple python. Anyone know how to solve this error.

Hi, I have the same error, however, it's for the newest version of mqtt_io add-on:
Add-on: MQTT IO
 Expose GPIO modules and digital sensors via MQTT for remote control and monitoring.
-----------------------------------------------------------
 Add-on version: 0.1.3
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.3  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2022.10.5
 Home Assistant Supervisor: 2022.10.0```

I'm using this config:

mqtt:
topic_prefix: home/depot/climate
ha_discovery:
enabled: yes
sensor_modules:

name: dht_depot
module: dht22
type: DHT22
pin: 4

sensor_inputs:

name: depot_temp
module: dht_depot
interval: 10
digits: 4
type: temperature
ha_discovery:
name: Depot temperature
device_class: temperature
name: depot_humidity
module: dht_depot
interval: 10
digits: 4
type: humidity
ha_discovery:
name: Depot humidity
device_class: humidity

And here is the log:
```2022-11-02 20:37:11 mqtt_io.server [INFO] Connecting to MQTT...
2022-11-02 20:37:12 mqtt_io.server [INFO] Connected to MQTT
2022-11-02 20:37:21 mqtt_io.server [ERROR] Exception when retrieving value from sensor 'depot_temp':
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/mqtt_io/server.py", line 561, in poll_sensor
    value = await get_sensor_value()
  File "/usr/lib/python3.10/site-packages/backoff/_async.py", line 133, in retry
    ret = await target(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/backoff/_async.py", line 66, in retry
    ret = await target(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/mqtt_io/server.py", line 556, in get_sensor_value
    return await sensor_module.async_get_value(sens_conf)
  File "/usr/lib/python3.10/site-packages/mqtt_io/modules/sensor/__init__.py", line 57, in async_get_value
    return await loop.run_in_executor(ThreadPoolExecutor(), self.get_value, sens_conf)
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.10/site-packages/mqtt_io/modules/sensor/dht22.py", line 62, in get_value
    humidity, temperature = self.sensor.read_retry(self.sensor_type, self.pin)
  File "/usr/lib/python3.10/site-packages/Adafruit_DHT/common.py", line 94, in read_retry
    humidity, temperature = read(sensor, pin, platform)
  File "/usr/lib/python3.10/site-packages/Adafruit_DHT/common.py", line 81, in read
    return platform.read(sensor, pin)
  File "/usr/lib/python3.10/site-packages/Adafruit_DHT/Raspberry_Pi_2.py", line 34, in read
    raise RuntimeError('Error accessing GPIO.')
RuntimeError: Error accessing GPIO.```

Is it something wrong with my config? I have tried two different DHT22 devices connected in the same way

How do you execute it? Looks like a privilege problem!

I simply added the add-on to the HA and clicked the run button. I'm using HASSIO so I assumed it runs with full access to everything.

So I would have to install it with other distribution and then install HA and mqtt.io separately. Thanks for help! I'll back with my findings here

@mchmielarz i will close this issue, because it was originally related to docker (2020). Please create a new issue or use #293
Thanks!


void transactions on fail

Currently, if anything goes wrong with payment.complete! or<EMAIL_ADDRESS>, the payment gets stuck in an invalid state (because solidus has a method called invalidate_old_payments even though the loan went through on paybright side. this is a terrible state to be in, and if something goes wrong with the order, the loan should be immediately voided so the user can just retry the order again.

@carpodaster as for tests, i didnt want to add any without first getting approval that this flow is fine from people


feat: fix argon2 parsing and comparison

Argon2 parsing and comparison is broken in multiple ways:

Incorrect comparison being done using ConstantTimeCompare. This Go API is awful as it returns 1 on equality (unlike all other comparison APIs that return 0) so it was missed.
All Argon2 comparisons were producing incorrect derived keys due to the multiplication by 1024. The argon2.Key and IDKey accept KiB as arguments (not bytes!) which caused all hashes to always be incorrect.

Tests didn't catch this as they only tested for the positive case (which passed with flying colors).

Pull Request Test Coverage Report for Build<PHONE_NUMBER>6
Details

16 of 20 (80.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.03%) to 57.387%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

internal/crypto/password.go
16
20
80.0%

Totals

Change from base Build<PHONE_NUMBER>0:
0.03%

Covered Lines:
9742

Relevant Lines:
16976

💛  - Coveralls

Super grateful for the quick turnaround on getting this through! Not to sound the slightest bit ungrateful, but is there guidance on how long to expect the problem to persist on my cloud hosted project?

Super grateful for the quick turnaround on getting this through! Not to sound the slightest bit ungrateful, but is there guidance on how long to expect the problem to persist on my cloud hosted project?

Rollout is underway.