Building docs on Windows

I have trouble building docs which I guess has to do with me being on Windows.
I've set up the environment according to the latest contributing guide:

pip/conda commands
curl --remote-name https://raw.githubusercontent.com/mne-tools/mne-python/master/environment.yml
conda env create --file environment.yml --name mnedev
conda activate mnedev

cd mne-python
pip uninstall -y mne
pip install -e .

pip install -r requirements_doc.txt

conda install -c conda-forge sphinx-autobuild doc8

The html-dev-noplot target does give me the htmls that don't have the plots (as expected) but it breaks with an unifomative error after/during "embedding documentation hyperlinks for auto_tutorials..." step:

`make html-dev-noplot` output
BUILD_DEV_HTML=1 sphinx-build -D plot_gallery=0 -b html -d _build/doctrees  -nWT --keep-going . _build/html
Running Sphinx v3.1.2
making output directory... done
[autosummary] generating autosummary for: bibliography.rst, cited.rst, glossary.rst, index.rst, install\advanced.rst, install\contributing.rst, install\freesurfer.rst, install\index.rst, install\mne_c.rst, install\mne_python.rst, ..., overview\get_help.rst, overvie
w\implementation.rst, overview\index.rst, overview\learn_python.rst, overview\matlab.rst, overview\migrating.rst, overview\roadmap.rst, python_reference.rst, references.rst, whats_new.rst
[autosummary] generating autosummary for: D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.AcqParserFIF.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.Annotations.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo
\doc\generated\mne.BaseEpochs.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.BiHemiLabel.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.Covariance.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\gene
rated\mne.Dipole.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.DipoleFixed.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.Epochs.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.EpochsA
rray.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.Evoked.rst, ..., D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.write_cov.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.write_events.rst
, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.write_evokeds.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.write_forward_solution.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.write_lab
el.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.write_labels_to_annot.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.write_proj.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.write_s
ource_spaces.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.write_surface.rst, D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\mne.write_trans.rst
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://numpy.org/devdocs/objects.inv...
loading intersphinx inventory from https://scipy.github.io/devdocs/objects.inv...
loading intersphinx inventory from https://matplotlib.org/objects.inv...
loading intersphinx inventory from https://scikit-learn.org/stable/objects.inv...
loading intersphinx inventory from https://numba.pydata.org/numba-doc/latest/objects.inv...
loading intersphinx inventory from https://joblib.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from http://docs.enthought.com/mayavi/mayavi/objects.inv...
loading intersphinx inventory from https://nipy.org/nibabel/objects.inv...
loading intersphinx inventory from http://nilearn.github.io/objects.inv...
loading intersphinx inventory from https://pysurfer.github.io/objects.inv...
loading intersphinx inventory from https://pandas.pydata.org/pandas-docs/stable/objects.inv...
loading intersphinx inventory from https://seaborn.pydata.org/objects.inv...
loading intersphinx inventory from https://www.statsmodels.org/dev/objects.inv...
loading intersphinx inventory from https://patsy.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://dipy.org/documentation/1.1.1./objects.inv/...
loading intersphinx inventory from https://mne.tools/mne-realtime/objects.inv...
loading intersphinx inventory from https://pierreablin.github.io/picard/objects.inv...
generating gallery...
WARNING: optipng binaries not found, PNG images and thumbnails will not be optimized
Using pandoc version: None to convert rst text blocks to markdown for .ipynb files
generating gallery for auto_examples\io... [100%] plot_read_proj.py            trix.py
generating gallery for auto_examples\simulation... [100%] plot_source_simulator.pyusing_subject_anatomy.py
generating gallery for auto_examples\preprocessing... [100%] plot_xdawn_denoising.pyypy.py.py
generating gallery for auto_examples\visualization... [100%] plot_xhemi.py     ed.pytions.pypy
generating gallery for auto_examples\time_frequency... [100%] plot_time_frequency_simulated.py_power.py
generating gallery for auto_examples\stats... [100%] plot_sensor_regression.py st.py
generating gallery for auto_examples\decoding... [100%] plot_receptive_field_mtrf.pyyatial_filter.py.py
generating gallery for auto_examples\connectivity... [100%] plot_sensor_connectivity.py.pyivity.pyvolume.py
generating gallery for auto_examples\forward... [100%] plot_source_space_morphing.pyource.py
generating gallery for auto_examples\inverse... [100%] plot_vector_mne_solution.pyorm_inverse.pypy
generating gallery for auto_examples\datasets... [100%] spm_faces_dataset.py
generating gallery for auto_tutorials\intro... [100%] plot_50_configure_mne.py py
generating gallery for auto_tutorials\io... [100%] plot_30_reading_fnirs_data.py
generating gallery for auto_tutorials\raw... [100%] plot_40_visualize_raw.py
generating gallery for auto_tutorials\preprocessing... [100%] plot_70_fnirs_processing.pyss.pypy
generating gallery for auto_tutorials\epochs... [100%] plot_40_epochs_to_data_frame.py
generating gallery for auto_tutorials\evoked... [100%] plot_whitened.py        .py
generating gallery for auto_tutorials\time-freq... [100%] plot_sensors_time_frequency.py
generating gallery for auto_tutorials\source-modeling... [100%] plot_visualize_stc.py.pyate.pyion.py
generating gallery for auto_tutorials\stats-sensor-space... [100%] plot_stats_spatio_temporal_cluster_sensors.pypy
generating gallery for auto_tutorials\stats-source-space... [100%] plot_stats_cluster_time_frequency_repeated_measures_anova.pyy
generating gallery for auto_tutorials\machine-learning... [100%] plot_sensors_decoding.py
generating gallery for auto_tutorials\simulation... [100%] plot_point_spread.pytructures.py
generating gallery for auto_tutorials\sample-datasets... [100%] plot_sleep.py  BTi.pyom_elekta.py
generating gallery for auto_tutorials\discussions... [100%] plot_background_statistics.py
generating gallery for auto_tutorials\misc... [100%] plot_report.py            e.py
generating MNE command help ... [100%] mne_what.py
checking for D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\references.bib in bibtex cache... not found
parsing bibtex file D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\references.bib... parsed 159 entries
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 28 source files that are out of date
updating environment: [new config] 716 added, 0 changed, 0 removed
checking for D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\references.bib in bibtex cache... not found_anovaa
parsing bibtex file D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\references.bib... parsed 159 entries
reading sources... [100%] whats_new                                            tctionbution_repair
D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\commands.rst:283: WARNING: undecodable source characters, replacing with "?": b'  --rej-eeg=REJ_EEG     EEG rejection parameter in >>>\xb5<<<V (peak to peak amplitude)\r'
D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\commands.rst:284: WARNING: undecodable source characters, replacing with "?": b'  --rej-eog=REJ_EOG     EOG rejection parameter in >>>\xb5<<<V (peak to peak amplitude)\r'
D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\commands.rst:357: WARNING: undecodable source characters, replacing with "?": b'  --rej-eeg=REJ_EEG     EEG rejection parameter in >>>\xb5<<<V (peak to peak amplitude)\r'
D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\commands.rst:358: WARNING: undecodable source characters, replacing with "?": b'  --rej-eog=REJ_EOG     EOG rejection parameter in >>>\xb5<<<V (peak to peak amplitude)\r'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] whats_new                                             ctionbution_repairated_measures_anovaa
WARNING: dot command 'dot' cannot be run (needed for graphviz output), check the graphviz_dot setting
generating indices...  genindex py-modindexdone
writing additional pages...  searchdone
copying images... [100%] overview\../_static/HeadCS.png                        mport_obj/blender_import_obj3.jpgmb.pngeated_measures_anova_thumb.pngg
copying downloadable files... [100%] auto_tutorials/time-freq/plot_sensors_time_frequency.ipynbfrequency_repeated_measures_anova.ipynbb
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build finished with problems, 6 warnings.
Sphinx-gallery gallery_conf["plot_gallery"] was False, so no examples were executed.
embedding documentation hyperlinks...
embedding documentation hyperlinks for auto_examples... [100%] plot_xhemi.html ized.htmlons.htmlmlwer.htmlmy.html
embedding documentation hyperlinks for auto_tutorials... [100%] plot_sensors_time_frequency.htmly_repeated_measures_anova.htmll
make: *** [Makefile:54: html_dev-noplot] Error 1

And the "html_dev" target breaks almost immediately during "generating gallery...":

`make html_dev` output
BUILD_DEV_HTML=1 sphinx-build -b html -d _build/doctrees  -nWT --keep-going . _build/html
Running Sphinx v3.1.2
loading pickled environment... done
[autosummary] generating autosummary for: auto_examples\connectivity\plot_cwt_sensor_connectivity.rst, auto_examples\connectivity\plot_mixed_source_space_connectivity.rst, auto_examples\connectivity\plot_mne_inverse_coherence_epochs.rst, auto_examples\connectivity\
plot_mne_inverse_connectivity_spectrum.rst, auto_examples\connectivity\plot_mne_inverse_envelope_correlation.rst, auto_examples\connectivity\plot_mne_inverse_envelope_correlation_volume.rst, auto_examples\connectivity\plot_mne_inverse_label_connectivity.rst, auto_e
xamples\connectivity\plot_mne_inverse_psi_visual.rst, auto_examples\connectivity\plot_sensor_connectivity.rst, auto_examples\datasets\plot_brainstorm_data.rst, ..., overview\get_help.rst, overview\implementation.rst, overview\index.rst, overview\learn_python.rst, o
verview\matlab.rst, overview\migrating.rst, overview\roadmap.rst, python_reference.rst, references.rst, whats_new.rst
generating gallery...

Traceback (most recent call last):
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\psutil\_pswindows.py", line 679, in wrapper
    return fun(self, *args, **kwargs)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\psutil\_pswindows.py", line 933, in create_time
    user, system, created = cext.proc_times(self.pid)
ProcessLookupError: [Errno 3] No such process (originated from GetExitCodeProcess != STILL_ACTIVE)

During handling of the above exception, another exception occurred:

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

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx\events.py", line 110, in emit
    results.append(listener.handler(self.app, *args))
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx_gallery\gen_gallery.py", line 381, in generate_gallery_rst
    gallery_conf = parse_config(app)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx_gallery\gen_gallery.py", line 94, in parse_config
    gallery_conf = _complete_gallery_conf(
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx_gallery\gen_gallery.py", line 171, in _complete_gallery_conf
    gallery_conf['memory_base'] = _get_memory_base(gallery_conf)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx_gallery\gen_rst.py", line 484, in _get_memory_base
    memories = memory_usage(proc, interval=1e-3, timeout=timeout)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\memory_profiler.py", line 369, in memory_usage
    mem_usage = _get_memory(
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\memory_profiler.py", line 191, in _get_memory
    return tools[backend]()
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\memory_profiler.py", line 135, in ps_util_tool
    process = psutil.Process(pid)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\psutil\__init__.py", line 346, in __init__
    self._init(pid)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\psutil\__init__.py", line 386, in _init
    raise NoSuchProcess(pid, None, msg)
psutil.NoSuchProcess: psutil.NoSuchProcess no process found with pid 18008

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx\cmd\build.py", line 276, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx\application.py", line 277, in __init__
    self._init_builder()
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx\application.py", line 333, in _init_builder
    self.events.emit('builder-inited')
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx\events.py", line 117, in emit
    raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function generate_gallery_rst at 0x00000217C3739820> for event 'builder-inited' threw an exception

Extension error:
Handler <function generate_gallery_rst at 0x00000217C3739820> for event 'builder-inited' threw an exception
Exception ignored in: <function Popen.__del__ at 0x00000217721D7B80>
Traceback (most recent call last):
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\subprocess.py", line 942, in __del__
    _warn("subprocess %s is still running" % self.pid,
ResourceWarning: subprocess 18008 is still running
make: *** [Makefile:44: html_dev] Error 2

I don't understand how to debug this. Googling the errors didn't help.
Has anyone had similar issues with docs? Has anyone been able to build docs on Windows?

There is no description here, but you should be able to build docs on windows in principle

There is no description here...

I am sorry about this. Not sure what happened here: I still have the tab with the unsubmitted issue which I started filling yesterday. I will copy the description here now.

Our doc build treats warnings as errors, so your errors are actually above:
D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\commands.rst:283: WARNING: undecodable source characters, replacing with "?": b'  --rej-eeg=REJ_EEG     EEG rejection parameter in >>>\xb5<<<V (peak to peak amplitude)\r'
D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\commands.rst:284: WARNING: undecodable source characters, replacing with "?": b'  --rej-eog=REJ_EOG     EOG rejection parameter in >>>\xb5<<<V (peak to peak amplitude)\r'
D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\commands.rst:357: WARNING: undecodable source characters, replacing with "?": b'  --rej-eeg=REJ_EEG     EEG rejection parameter in >>>\xb5<<<V (peak to peak amplitude)\r'
D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\generated\commands.rst:358: WARNING: undecodable source characters, replacing with "?": b'  --rej-eog=REJ_EOG     EOG rejection parameter in >>>\xb5<<<V (peak to peak amplitude)\r'

This suggests that it's a problem with encodings. Can you add this to doc/conf.py to see if it helps:
source_encoding = 'utf-8-sig'

It really shouldn't since that's the default. Maybe also a sphinx update might help?

Thanks for taking a look, @larsoner!
I tried uncommenting # source_encoding = 'utf-8-sig' but it did not help, unfortunately.
Notepad++ says that "commands.rst" is actually ANSI-encoded. After checking several of the other files, it looks like all the other ones in "doc/generated/" are UTF-8 so changing source_encoding to ANSI would not work either. 😕
My sphinx (3.1.2) is up to date with the latest pypi version so no luck there either.

Try changing this line:
https://github.com/mne-tools/mne-python/blob/master/doc/sphinxext/gen_commands.py#L69
to
    with open(out_fname, 'w', encoding='utf8') as f:

This should ensure that it's UTF8 encoded. It's possible there are other places that this needs to be done, too (probably in sphinx-gallery?). A workaround is to export PYTHONIOENCODING=utf8 before running, though we should probably fix any other occurrences, too.

Setting the encoding for 'commands.rst' helped with the "undecodable source characters errors/warnings"!
html_dev-noplot still ends with "Errror 1" though.

Here is the new output
BUILD_DEV_HTML=1 sphinx-build -D plot_gallery=0 -b html -d _build/doctrees  -nWT --keep-going . _build/html
Running Sphinx v3.1.2
loading pickled environment... done
[autosummary] generating autosummary for: auto_examples\connectivity\plot_cwt_sensor_connectivity.rst, auto_examples\connectivity\plot_mixed_source_space_connectivity.rst, auto_examples\connectivity\plot_mne_inverse_coherence_epochs.rst, auto_examples\connectivity\
plot_mne_inverse_connectivity_spectrum.rst, auto_examples\connectivity\plot_mne_inverse_envelope_correlation.rst, auto_examples\connectivity\plot_mne_inverse_envelope_correlation_volume.rst, auto_examples\connectivity\plot_mne_inverse_label_connectivity.rst, auto_e
xamples\connectivity\plot_mne_inverse_psi_visual.rst, auto_examples\connectivity\plot_sensor_connectivity.rst, auto_examples\datasets\plot_brainstorm_data.rst, ..., overview\get_help.rst, overview\implementation.rst, overview\index.rst, overview\learn_python.rst, o
verview\matlab.rst, overview\migrating.rst, overview\roadmap.rst, python_reference.rst, references.rst, whats_new.rst
generating gallery...
WARNING: optipng binaries not found, PNG images and thumbnails will not be optimized
Using pandoc version: None to convert rst text blocks to markdown for .ipynb files
generating gallery for auto_examples\io... [100%] plot_read_proj.py            trix.py
generating gallery for auto_examples\simulation... [100%] plot_source_simulator.pyusing_subject_anatomy.py
generating gallery for auto_examples\preprocessing... [100%] plot_xdawn_denoising.pyypy.py.py
generating gallery for auto_examples\visualization... [100%] plot_xhemi.py     ed.pytions.pypy
generating gallery for auto_examples\time_frequency... [100%] plot_time_frequency_simulated.py_power.py
generating gallery for auto_examples\stats... [100%] plot_sensor_regression.py st.py
generating gallery for auto_examples\decoding... [100%] plot_receptive_field_mtrf.pyyatial_filter.py.py
generating gallery for auto_examples\connectivity... [100%] plot_sensor_connectivity.py.pyivity.pyvolume.py
generating gallery for auto_examples\forward... [100%] plot_source_space_morphing.pyource.py
generating gallery for auto_examples\inverse... [100%] plot_vector_mne_solution.pyorm_inverse.pypy
generating gallery for auto_examples\datasets... [100%] spm_faces_dataset.py
generating gallery for auto_tutorials\intro... [100%] plot_50_configure_mne.py py
generating gallery for auto_tutorials\io... [100%] plot_30_reading_fnirs_data.py
generating gallery for auto_tutorials\raw... [100%] plot_40_visualize_raw.py
generating gallery for auto_tutorials\preprocessing... [100%] plot_70_fnirs_processing.pyss.pypy
generating gallery for auto_tutorials\epochs... [100%] plot_40_epochs_to_data_frame.py
generating gallery for auto_tutorials\evoked... [100%] plot_whitened.py        .py
generating gallery for auto_tutorials\time-freq... [100%] plot_sensors_time_frequency.py
generating gallery for auto_tutorials\source-modeling... [100%] plot_visualize_stc.py.pyate.pyion.py
generating gallery for auto_tutorials\stats-sensor-space... [100%] plot_stats_spatio_temporal_cluster_sensors.pypy
generating gallery for auto_tutorials\stats-source-space... [100%] plot_stats_cluster_time_frequency_repeated_measures_anova.pyy
generating gallery for auto_tutorials\machine-learning... [100%] plot_sensors_decoding.py
generating gallery for auto_tutorials\simulation... [100%] plot_point_spread.pytructures.py
generating gallery for auto_tutorials\sample-datasets... [100%] plot_sleep.py  BTi.pyom_elekta.py
generating gallery for auto_tutorials\discussions... [100%] plot_background_statistics.py
generating gallery for auto_tutorials\misc... [100%] plot_report.py            e.py
generating MNE command help ... [100%] mne_what.py
checking for D:\onedrives\OneDrive\projects\ssvep_tutorial\repo\doc\references.bib in bibtex cache... up to date
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 6 changed, 0 removed
reading sources... [100%] generated/mne.write_surface
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] python_reference
generating indices...  genindex py-modindexdone
writing additional pages...  searchdone
copying images... [100%] auto_examples/inverse/images/thumb/sphx_glr_plot_vector_mne_solution_thumb.pngerse_thumb.pngngpngngpngsures_anova_thumb.pngg
copying downloadable files... [100%] auto_tutorials/auto_tutorials_jupyter.zip _frequency.ipynbfrequency_repeated_measures_anova.ipynbb
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build finished with problems, 1 warning.
Sphinx-gallery gallery_conf["plot_gallery"] was False, so no examples were executed.
embedding documentation hyperlinks...
embedding documentation hyperlinks for auto_examples... [100%] plot_xhemi.html ized.htmlons.htmlmlwer.htmlmy.html
embedding documentation hyperlinks for auto_tutorials... [100%] plot_sensors_time_frequency.htmly_repeated_measures_anova.htmll
make: *** [Makefile:54: html_dev-noplot] Error 1

Near the end, it says "build finished with problems, 1 warning.". The only warning I could find is this:
WARNING: optipng binaries not found, PNG images and thumbnails will not be optimized

Could it be that everything is actually building correctly and the error is the consequence of this warning?

Yes, warnings are treated as errors so this is indeed the cause of the failure. Can you see how hard it is to install optipng? If it's difficult on windows, we can make that fix build conf entry depend on the OS.

I download "optipng.exe" here and saved it in the "doc" folder. This got rid of the optipng warning. The new one is
WARNING: dot command 'dot' cannot be run (needed for graphviz output), check the graphviz_dot setting

Googling this one now 😃

You need to have the graphviz command-line programs on your machine.
BTW once you figure this out, it would be nice to add this info to the dev docs for the next person. The requirements are valid on all systems -- on macOS you probably use brew, Linux your package manager, and Windows maybe we should give people links to download pages.

I installed graphviz using conda. The html_dev-noplot finished without errors!
The html_dev still breaks though:

make html_dev
BUILD_DEV_HTML=1 sphinx-build -b html -d _build/doctrees  -nWT --keep-going . _build/html
Running Sphinx v3.1.2
loading pickled environment... done
[autosummary] generating autosummary for: auto_examples\connectivity\plot_cwt_sensor_connectivity.rst, auto_examples\connectivity\plot_mixed_source_space_connectivity.rst, auto_examples\connectivity\plot_mne_inverse_coherence_epochs.rst, auto_examples\connectivity\
plot_mne_inverse_connectivity_spectrum.rst, auto_examples\connectivity\plot_mne_inverse_envelope_correlation.rst, auto_examples\connectivity\plot_mne_inverse_envelope_correlation_volume.rst, auto_examples\connectivity\plot_mne_inverse_label_connectivity.rst, auto_e
xamples\connectivity\plot_mne_inverse_psi_visual.rst, auto_examples\connectivity\plot_sensor_connectivity.rst, auto_examples\datasets\plot_brainstorm_data.rst, ..., overview\get_help.rst, overview\implementation.rst, overview\index.rst, overview\learn_python.rst, o
verview\matlab.rst, overview\migrating.rst, overview\roadmap.rst, python_reference.rst, references.rst, whats_new.rst
generating gallery...

Traceback (most recent call last):
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\psutil\_pswindows.py", line 679, in wrapper
    return fun(self, *args, **kwargs)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\psutil\_pswindows.py", line 933, in create_time
    user, system, created = cext.proc_times(self.pid)
ProcessLookupError: [Errno 3] No such process (originated from GetExitCodeProcess != STILL_ACTIVE)

During handling of the above exception, another exception occurred:

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

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx\events.py", line 110, in emit
    results.append(listener.handler(self.app, *args))
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx_gallery\gen_gallery.py", line 381, in generate_gallery_rst
    gallery_conf = parse_config(app)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx_gallery\gen_gallery.py", line 94, in parse_config
    gallery_conf = _complete_gallery_conf(
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx_gallery\gen_gallery.py", line 171, in _complete_gallery_conf
    gallery_conf['memory_base'] = _get_memory_base(gallery_conf)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx_gallery\gen_rst.py", line 484, in _get_memory_base
    memories = memory_usage(proc, interval=1e-3, timeout=timeout)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\memory_profiler.py", line 369, in memory_usage
    mem_usage = _get_memory(
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\memory_profiler.py", line 191, in _get_memory
    return tools[backend]()
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\memory_profiler.py", line 135, in ps_util_tool
    process = psutil.Process(pid)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\psutil\__init__.py", line 346, in __init__
    self._init(pid)
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\psutil\__init__.py", line 386, in _init
    raise NoSuchProcess(pid, None, msg)
psutil.NoSuchProcess: psutil.NoSuchProcess no process found with pid 14508

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx\cmd\build.py", line 276, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx\application.py", line 277, in __init__
    self._init_builder()
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx\application.py", line 333, in _init_builder
    self.events.emit('builder-inited')
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\site-packages\sphinx\events.py", line 117, in emit
    raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function generate_gallery_rst at 0x00000237B66C8820> for event 'builder-inited' threw an exception

Extension error:
Handler <function generate_gallery_rst at 0x00000237B66C8820> for event 'builder-inited' threw an exception
Exception ignored in: <function Popen.__del__ at 0x0000023765147B80>
Traceback (most recent call last):
  File "d:\software_windows\miniconda3\envs\mne_ssvep_tutorial\lib\subprocess.py", line 942, in __del__
    _warn("subprocess %s is still running" % self.pid,
ResourceWarning: subprocess 14508 is still running
make: *** [Makefile:44: html_dev] Error 2

it would be nice to add this info to the dev docs for the next person

Sure thing! Just to recap what has helped with the html_dev-noplot target:

Change this line to
with open(out_fname, 'w', encoding='utf8') as f:
Download "optipng.exe" here and save it in the "doc" folder.
Install graphviz with
conda install graphviz

Specifying encoding='utf-8' is something we could change for all users, rather than asking windows users to change it locally. Istalling graphviz from conda is also something we could do for all platforms. Not sure about optipng, providing a download link maybe be the best option there.

@kalenkovich can you open a PR to update the gen_commands.py file with the encoding line?
For the graphviz and optipng it would be good to update the dev docs with platform-agnostic (graphviz) and platform-specific (optipng) instructions. Up for changing that in the same PR?

Up for changing that in the same PR?

Sure. But maybe we should figure out why the docs are not building first? Or, the partial solution is ok?

If you installed memory_profiler recently and it's giving these problems then it's probably just unstable on Windows. We should change this:
    'show_memory': True,

to
    'show_memory': not sys.platform.startswith('win'),

@larsoner, using 'show_memory': not sys.platform.startswith('win') helped with breaking on the "generating gallery" step! How did you figure this one out? 😲
The changes to docs, conf.py, gen_commands.py, etc. that we discussed above - do they belong to "Changelog", "Bug", or "API"?
I also have a new problem (I am good at getting those) make html_dev gets stuck on some files (plot_movement_detection.py, plot_muscle_detection.py). I've been deleting these and rerunning make html_dev to figure out the full list of problematic files. I'll report back here once I get to the end of html_dev or to a different kind of problem.

@larsoner, using 'show_memory': not sys.platform.startswith('win') helped with breaking on the "generating gallery" step! How did you figure this one out? ￼

The errors you were getting had to do with psutil trying to measure memory. It has been unreliable on macOS before, so it makes sense it would be even less reliable on Windows. So it makes sense to disable it -- it's helpful but not (usually) critical information.

The changes to docs, conf.py, gen_commands.py, etc. that we discussed above - do they belong to "Changelog", "Bug", or "API"?

Changelog, something like "- Improved documentation building instructions and execution on Windows by ..." would be good

I also have a new problem (I am good at getting those) make html_dev gets stuck on some files (plot_movement_detection.py, plot_muscle_detection.py)

Looking briefly at plot_muscle_detection.py I don't see why this would be problematic. Even looking at the semi-private sg_execution_times for when CircleCI built the docs, it only took 400 MB and 6 sec. I'll boot into my Windows machine to take a look.
Does it fail if you do just PATTERN=muscle_detection make html_dev-pattern?

The changes to docs, conf.py, gen_commands.py, etc. that we discussed above - do they belong to "Changelog", "Bug", or "API"?

... before I boot into my Windows VM, can you open a WIP PR with these changes already in it so I can just checkout your branch?

Sure thing! Give me a couple of minutes.

Here it is: https://github.com/mne-tools/mne-python/pull/8057

Thanks to the updated contribution-guide, I could finally build the docs on Windows too.
But I had to overcome some additional problems which were not described:

Install GNU-Make (I did it via chocolatey)
Replace linux-related lines in Makefile (e.g. BUILD_DEV_HTML=1 for docs and rm -f .coverage for tests, ...)

Should we add them too? (@kalenkovich how did you solve them?)

Hi, I’m on vacation for the next two weeks so I won’t be able to look into
this in detail now. What I can tell you now is that I had installed make in
the base conda environment some time ago - I think this option should be
added to the guide, probably installing into the mne-dev environment
instead  of the base one. The thing is, I didn’t need to change anything
else so I must have installed something else at one time or another but I
have no idea what it was. It might have been a conda-less install of Cygwin
or something like that - unfortunately, I can’t tell what it was right now.
It would be great to try to build the docs on a fresh install of Windows 10
to figure it out. Hope this helps.
On Fri, 31 Jul 2020 at 21:33, Martin Schulz<EMAIL_ADDRESS>wrote:

Thanks to the updated contribution-guide, I could finally build the docs
on Windows too.
But I had to overcome some additional problems which were not described:

Install GNU-Make (I did it via chocolatey)
Replace linux-related lines in Makefile (e.g. BUILD_DEV_HTML=1 for
docs and rm -f .coverage for tests, ...)

Should we add them too? (@kalenkovich https://github.com/kalenkovich
how did you solve them?)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mne-tools/mne-python/issues/8027#issuecomment-667290685,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACGUAWSSGLB5NSZECHHR3NTR6MFATANCNFSM4PBJ25LQ
.

Ok, I will try it again with the conda version, maybe that is also a solution for the MakeFiles.
Otherwise, we maybe need Cygwin as a requirement or MakeFiles adapted to Windows.
I tried the WSL2 too, but I ran into some OpenGL-issues with the XMing-Server when I tried to run the documentation

@larsoner Thank you, I tried it and put the make.exe from stackoverflow into Git/cmd/. Unfortunately, for me it says "msys-1.0.dll could not be found" and doesn't work. I also tried this with the same result

Sphinx does not require make on windows. We should see how our makefile hacks can be used without make

Unfortunately, for me it says "msys-1.0.dll could not be found" and doesn't work. I also tried this with the same result

This is while in the git bash terminal? If so I'll try uninstalling and reinstalling with step-by-step instructions

Sphinx does not require make on windows. We should see how our makefile hacks can be used without make

No idea if there is some tool to convert Makefile style commands to something else. Somehow I doubt it because this would just replicate make itself...
Also there's value in getting people a usable bash shell on Windows, so I'd rather go that route. It would allow us to assume all devs have access to some basic bash utilities, which is nice. Maybe Windows Subsystem for Linux would work here.

This is while in the git bash terminal?
Oh no, I only tried it with the Anaconda-Terminal. In the Git Bash-Terminal for Windows it works fine (after once conda init bash and activating my dev-environment, which didn't work in Cygwin for me). This works without modifying the Makefile, so the only thing to do for new contributors on Windows is to download make (maybe this one got the more reliable download-source and instructions?)

Should I add something for this into the documentation?

Maybe Windows Subsystem for Linux would work here
I tried it with WSL2 and Xming-Server, but got a OpenGl-Error when I tried building the docs.

qt.qpa.xcb: X server does not support XInput 2
failed to get the current screen resources
2020-08-24 17:57:41.050 (   1.447s) [         9DC0740]vtkXOpenGLRenderWindow.:251    ERR| vtkXOpenGLRenderWindow (0x7fffbccbdf40): Could not find a decent config

2020-08-24 17:57:41.051 (   1.448s) [         9DC0740]vtkXOpenGLRenderWindow.:468    ERR| vtkXOpenGLRenderWindow (0x7fffbccbdf40): Could not find a decent visual

For other things with no graphical output involved, like mne make_watershed or recon-all, WSL2 works fine for me.

If WSL doesn't work for graphics then let's not recommend it. If msysgit + make download/install works let's just give instructions for that. I've used it for years without problems, and it does take care of git + make handling in one solution, which is nice.
@marsipu want to take a stab at updating the docs as was done in #8057 ? It would be great to get these docs updated in the next couple of weeks so that it can be part of the upcoming 0.21 release

want to take a stab at updating the docs as was done in #8057 ?

Yes sure, I'll do it in the next days

Short question for this passage:

On Windows, we recommend git Bash_ rather than the official Windows version of git, because git Bash provides its own shell that includes many
Linux-equivalent command line programs that are useful for development.
Windows 10 also offers the Windows subsystem for Linux that offers similar
functionality to git Bash, but has not been widely tested by MNE-Python
developers yet.

The downloads from official git and git for Windows for Windows are the same. If there is no other major difference, could I shorten it to avoid confusion?

Yeah feel free to update or shorten

May I add myself to names.inc?

sure !

Yes typically we update latest.inc to mention the improvement and the name at the end needs a corresponding entry in names.inc

Cool, thank you. Very exciting:)

Fixed by #8164


Fixes timer invocation after app restarts.

Description
Fixes timer invocation after app restarts.
Returns timer name when registering it.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #362 #355
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[X] Code compiles correctly
[X] Created/updated tests
[ ] Extended the documentation

This is a good example of code coverage reduction because code that was previously covered got removed.


Fix draw_seed causing device discrepancy issue during torch's symbolic execution

Fixes https://github.com/keras-team/keras/issues/19288

Codecov Report
Attention: Patch coverage is 0% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 54.23%. Comparing base (c8700f4) to head (b32595c).
Report is 89 commits behind head on master.

Files
Patch %
Lines

keras/backend/torch/random.py
0.00%
9 Missing :warning:

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #19289       +/-   ##
===========================================
- Coverage   80.14%   54.23%   -25.91%
===========================================
  Files         341      365       +24
  Lines       36163    39800     +3637
  Branches     7116     7720      +604
===========================================
- Hits        28982    21585     -7397
- Misses       5578    16644    +11066
+ Partials     1603     1571       -32

Flag
Coverage Δ

keras
54.23% <0.00%> (-25.76%)
:arrow_down:

keras-jax
?

keras-numpy
54.23% <0.00%> (-2.86%)
:arrow_down:

keras-tensorflow
?

keras-torch
?

Flags with carried forward coverage won't be shown. Click here to find out more.

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


Issues with the installation of the package

Hey there,
I simply can't install the package while using the following:
if (!require(remotes)) {
    install.packages("remotes")
}
remotes::install_github('jorvlan/raincloudplots')

library(raincloudplots)

I get "unknown package" error.

Can you show me the error message?

Hi @jorvlan,
I do not know if this is related, but I also got an error when use {dtupdate} package to update non-CRAN packages.
Warning message:
In read.dcf(url_con, fields = "Version") :
  cannot open URL 'https://raw.githubusercontent.com/jorvlan/raincloudplots/master/DESCRIPTION': HTTP status was '404 Not Found'

But the package is usable, I can also reinstall it.

@dikiprawisuda thanks for your feedback.
I haven't used {dtupdate} myself, so my guess would be to update our package manually (if needed?) There only has been one update so far (0.1.0 > 0.2.0).

I apologise for a very slow response. Please find the reprex below:
if (!require(remotes)) {
  install.packages("remotes")
}
#> Loading required package: remotes
remotes::install_github('jorvlan/raincloudplots')
#> Error: Failed to install 'unknown package' from GitHub:
#>   HTTP error 404.
#>   Not Found
#>
#>   Did you spell the repo owner (`jorvlan`) and repo name (`raincloudplots`) correctly?
#>   - If spelling is correct, check that you have the required permissions to access the repo.

library(raincloudplots)
#> Error in library(raincloudplots): there is no package called 'raincloudplots'

Created on 2021-03-16 by the reprex package (v0.3.0)

Can you check the following options:

make sure you have devtools installed
update R to the newest version 4.0.4
try remotes::install_github with a different R-package and see if this works.
install the newest version of raincloudplots 0.2.0

I had the same problem. Had to update the remotes package first, then installation went fine.


Ability to catch promise rejections from background refreshes

This PR introduces onBackgroundRefreshError configuration option, which makes it possible to handle promise rejections originating from background refreshes.
As it stands now, depending on your Node version, process might crash. process.on('uncaughtException', ...) fixes that, but we missed a bit more... targeted approach to handling these errors, so here is a PR.

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

Comparison is base (59b53a5) 0.00% compared to head (6e35c40) 100.00%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@              Coverage Diff              @@
##           master      #637        +/-   ##
=============================================
+ Coverage        0   100.00%   +100.00%
=============================================
  Files           0         5         +5
  Lines           0       327       +327
  Branches        0        81        +81
=============================================
+ Hits            0       327       +327

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

@Kauhsa can we get an update on this?

@Kauhsa can we get an update on this?

Sure. Rebased.

@Kauhsa - thanks so much for adding this in and updating the readme. We will get this published in the next couple weeks.


Projection iterations exceed max

1001/1000 -> 1000/1000
Maybe show in % in addition.

percent added, step cap set so it cannot exceed anymore


Dependency updates for security

I ran npm audit fix
I then ran most of the npm install and npm update commands it suggested.

The offending package 'hoek' is no longer included in the package-lock.json file at all.
There are still many 'low severity' issues remaining, but I'm unable to fix them due as I started getting this error: Your configured registry (https://registry.npmjs.org/) does not support audit requests.
This should remove the big scary warning though.

For context for anyone happening by: the vulnerability was in a dep of the coveralls package, which runs and generates a coverage report here: https://coveralls.io/github/ConsenSys/Tokens?branch=coverage_test. This does not present a vector for maliciously modifying the contract code, or the test suites themselves.

Please approve this.


Multilayer Neural Network

Created a multilayer neural network class  which uses the matrix library in this repository for matrix operations. Some functionality is changed like you need to pass only 2 parameters(number of input nodes, number of output nodes) to the constructor of the neural network and for adding a hidden layer you need to call the function addHiddenLayer(number of neurons) for adding a hiddenLayer to your neural network and before training and after calling all addHiddenLayer function calls you need to call the config() function.

You may be interested on this

Wow, it is really great. Your code is quite optimised and is much more short and precise than mine.

Thank you. But I'm not really sure that it will produce the expected result. Yours seems much better and promising though.

Haven't looked in here before i've wrote my Version, i've merged it into the nn.js file, so it's not breaking the examples, but i like your approach. And i've broke the serialize and have no clue how to fix it..
Maybe somebody of you know a way to fix it? link
@xxMrPHDxx yours looks really awesome!

You can try to use this serialize function instead
serialize() {
   let cache = [];
   return JSON.stringify(this,(key, value) => {
      if (typeof value === 'object' && value !== null) {
         if (cache.indexOf(value) !== -1) {
            // Circular reference found, discard key
            return;
         }
         // Store value in our collection
         cache.push(value);
      }
      return value;
   });
   cache = null;
}

Thank you so much for this contribution and discussion! At the moment I prefer #61 and keeping just a single NeuralNetwork class as well as adding a Layer class.


[move-prover] make the no_opaque test ignore internal functions only

Prior to this commit, the no_opaque test ignores pragma opaque in
almost every function. Although the prover does not time out in 40s,
this is still a non-trivial amount of time spend in unit test. More
importantly, this might not align with what we have envisioned for how
the specs are supposed to be written: specs are expected to be written
and complete for public-facing functions --- as a result, the
public-facing functions can be opaque from a verification point of view,
hence increasing compositionally of the specs. Inlining public
functions destroy such compositionally.
A lot of the .exp file updates are due to the removal of the
// separate_baseline: no_opaque directive in certain files. The key
change will be highlighted below.
This PR also cleans up a few inv-v1_exp and inv_v2_exp files, as
we do not have the inv-v1 test anymore.
Motivation
Reduce CI time, align with intended use cases
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
CI

/land


Returning Null returns length of 1

Why would returning null from a react component return a length of 1?  Shouldn't it be zero?
it.only('blah blah blah', () => {
  const someComponent = shallow(<SomeComponent />);
  expect(someComponent).to.have.length(0); // fails I get a length of 1
});

export function SomeComponent(props) {
  ....

  if(!something) return null; // why would length on shallow be 1 in this case?

  return (

Works!

  );
}

nevermind, I always use test markers which allows me to do a to.have.length(0).  I took the marker out and so you get the enzyme wrapper back.

You shouldn’t ever need test markers. Try adding .hostNodes() ?


Weather temperature always displays °C regardless of unit of measurement.

I have set up the plugin to call the weather (domain) and openweathermap (entity), and it gets the temperature correctly but display the temperature value as being celsius and ignores the unit of measurement. This only seems to happen with openweathermap as I have another sensor that shows correctly with °F after the value.
When I call the API directly (A GET call to /api/states) it displays the right information:
 { "entity_id": "sensor.openweathermap_temperature", "state": "27.5", "attributes": { "state_class": "measurement", "unit_of_measurement": "°F", "attribution": "Data provided by OpenWeatherMap", "device_class": "temperature", "friendly_name": "OpenWeatherMap Temperature" },
It actually displays the correct temperature, it just puts °C after it on the Stream Deck:

Thank you for your feedback.
It is a hardcoded problem an should be easy to solve:
https://github.com/cgiesche/streamdeck-homeassistant/blob/e3ac12840668e54683ad4a55521637b86a5763e7/src/modules/plugin/entityButtonImageFactory.js#L285


Support Parse Server

Please update  to support the option of a self hosted parse server

Added https://github.com/fitcom/parse-starter/commit/f0f00a0c410dd098fae1b868649ef2f74b1b9c53

Thank you


MQTT_Disconnect don't disconnect

Hi
MQTT_Disconnect clear memory but don't close TCP connection
I have edit the mqtt.c for close the TCP but if you can check
Tanks you for your work
mqtt.c.zip

Hey
With old version my ESP-07 module was having exception watchdog resets after disconnecting from MQTT and (straight after that) disconnecting from WIFI. Module was reseting in about 95% attempts.
Just replaced mqtt.c file with your version and so far my module is working fine as it is supposed to.
Was trying to find the problem for few days already. You made my day!
Thanks,
Luuke

Hi think i have found a "error in me new code"
of MQTT are disconnected for another reason of a desired disconnect the esp don't reconnect.
If i found a best solution i post.

@sifourquier You can try this https://github.com/vowstar/esp_mqtt, I'm testing and it is OK to safe disconnect MQTT client.
The whole project is still under testing so I'm not sure to create pull request to upstream, until it is stable.
You can use MQTT_Disconnect(MQTT_Client *mqttClient) to disconnect TCP connection,
and use MQTT_DeleteClient(MQTT_Client *mqttClient) to fully free the memory. When you delete client, you must redo MQTT_InitClient. When you use MQTT_Disconnect, need'nt re init client.

@sifourquier You can try this https://github.com/vowstar/esp_mqtt, I'm testing and it is OK to safe disconnect MQTT client.
The whole project is still under testing so I'm not sure to create pull request to upstream, until it is stable.
You can use MQTT_Disconnect(MQTT_Client *mqttClient) to disconnect TCP connection,
and use MQTT_DeleteClient(MQTT_Client *mqttClient) to fully free the memory. When you delete client, you must redo MQTT_InitClient. When you use MQTT_Disconnect, need'nt re init client.

To me, MQTT_Disconnect() should send a mqtt_msg_disconnect() message, message type  MQTT_MSG_TYPE_DISCONNECT = 14.  But that function isn't used.


Can't launch Electron app when sharp is packaged with asar

If I run an unpackaged application, then everything works.
But if I pack the /app folder to app.asar then I get this error.
It is interesting that the file C:\Users\zaval\AppData\Local\Temp\f8edd076-e814-4284-9114-8530aeb84b75.tmp.node actually exists.
Application without sharp works both packaged and unpackaged

A JavaScript error occurred in the main process
Uncaught Exception:
Error:
Something went wrong installing the "sharp" module
The specified module could not be found.
\\?\C:\Users\zaval\AppData\Local\Temp\f8edd076-e814-4284-9114-8530aeb84b75.tmp.node
Possible solutions:
- Install with the --verbose flag and look for errors: "npm install  --ignore-scripts=false --verbose sharp"
- Install for the current win32-x64 runtime: "npm install --platform=win32 --arch=x64 sharp"
- Consult the installation documentation: https://sharp.pixelplumbing.com/install
at Object.<anonymous>
(D:\tmp\changesize\resources\app.asar\node_modules\sharp\lib\sharp.js:31:9)
  at Module._compile (node:internal/modules/cjs/loader:1116:14)
  at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
  at Module.load (node:internal/modules/cjs/loader:988:32)
  at ModuleJoad (node:internal/modules/cjs/loader:829:12)
  at Functions Joad (node:electron/js2c/asar_bundle:5:13331)
  at Module.require (node:internal/modules/cjs/loader:1012:19) at require (node:internal/modules/cjs/helpers:102:18)
  at Object.<anonymous>
(D:\tmp\changesize\resources\app.asar\node_modules\sharp\lib\constructor.js:8:1)
  at Module._compile (node:internal/modules/cjs/loader:1116:14)

Did you see https://github.com/lovell/sharp/issues/678#issuecomment-275956028 , specifically the use of asarUnpack?

Thanks a lot!
This is a working solution but it still looks like a dirty hack. But I suspect that this is an "electron" problem but not a "sharp".
Is it possible to do something? Can you explain the nature of the problem?

Glad to hear the use of asarUnpack works. I believe the problem is that by default Electron only unpacks files that appear in require statements, but sharp, like many native dependencies, has shared libraries that will be dlopened.
If you're using Electron Forge see https://www.electronforge.io/config/plugins/auto-unpack-natives

Thanks for your help and comprehensive answer!


A Problem about image distortion

Hi, @jpuigcerver
I am reproducing your work by PyTorch (it is more scalable for me to do more base on your work).
In my experiment, without BN and image distortion, the cer on validation set is 5.45% and the cer on test set is 8.66%. This result is near your baseline result. Now I am trying to add BN into the model and add image distortion to image preprocessing.
My problem is how can I use the same parameter of image distortion. In my opinion, I can implment the affine transformation and morphological operation by opencv-python. But I don't know how to use your parameters. Can you help me?

First of all, apologies for the late reply.
You can find the newer version of Laia, ported to PyTorch, in http://github.com/jpuigcerver/PyLaia.
In fact, you can find scripts to reproduce the results from my paper (IAM database, no language model): https://github.com/jpuigcerver/PyLaia/tree/refactor_kws_egs_master/egs/iam-htr
The parameterisation that I used was a little bit tricky, and I actually changed it in PyLaia, for something simpler. In any case, I'm happy to explain any detail if you have a more concrete question.

@jpuigcerver Thanks for your reply, I have rewrite your distortion code by numpy and opencv, the cer of my experiment is 6.48%, which higher than your result. I'll check the difference of my reproduction and your PyLaia. Thank you again.


Expected Entity docs

"Create two actions", point 5 - Entity is automatically added as Required, not as Disqualifying.

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

ID: 3d21f646-6c2d-f8d9-7e21-e2b9c6cbba37
Version Independent ID: 9160bd07-13c8-701b-0aed-4f3d4c0cbb1c
Content: How to use the
Content Source: articles/cognitive-services/Labs/Conversation-Learner/tutorials/4-expected-entity.md
Service: cognitive-services
GitHub Login: @v-jaswel
Microsoft Alias: v-jaswel

@mariakisiel Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.
@v-jaswel Hi, this is a doc-bug issue, can you please check it and update the document as necessary? Thanks a lot!

Thank you! Doc has been updated.
#please-close


Support mapreduce.jobhistory.done-dir && intermediate-done-dir

This sets up the permissions on the JHS done directories in HDFS.

LGTM


Generate structs for the return data of abigen-erated contracts

Motivation
I explain the usecase in #1405, the short version is that you cannot easily decode the return of calls without an instatiated contract (::new() with a provider). Since abigen already generates structs representing calls, which AbiEncode into bytes, it only makes sense it should also have structs that AbiDecode the return data into a usable response representation.

Solution
I hope the code is mostly self explanitory. Since I am new to contributing here, I'd love some feedback on the stuff i did so far.
I'm wondering if you'd want there to be an enum for return structs when there is more than one, like with the calls? I can put it back in but i initially removed it.

PR Checklist

[ ] Added Tests
[ ] Added Documentation
[ ] Updated the changelog

like the direction - could you also add some tests for this?

I made a test now, let me know if it is satisfactory or what else should be tested. Note that this will not generate return bindings for functions that do not return anything.

That is correct, this only adds additional structs, it does not change the call-bindings in any way.


Issue with TPLink Tapo LED Bulb

Describe The Bug
ailed to get info about: <IP_ADDRESS> | The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
Expected behavior
NA
Logs
NA
Plugin Config
NA
Plugin Version
NA
Homebridge Version
NA
Node.js Version
NA
NPM Version
NA
Operating System
NA

Hey, You need to provide the logs

Hi Sorry about that,
Plugin Version: homebridge-tp-link-tapo v3.2.2
Bulb Version: 1.1.0 Build 230721 Rel.224802
When i ping the light, i do get response. Moreover i am able to use it through tplink app. Another LED Strip works just fine.
Here is the log,let me know if i have to attach any other thing

I have the same issue

I have the same issue (same logs) it just started to happen randomly. Bulbs still show up and work on Tapo App.
Models:
Tapo L530
HW version: 2.0
FW version: 1.1.0

This is also happening on
Model: L510
HW Version: 2.0
Firmware Version 1.1.0 Build 230721 Rel. 224802
Logs: (IP withdrawn)
[25/08/2023, 09:17:57] [TPLink Tapo Platform] Error sending command: deviceInfo AxiosError: connect ETIMEDOUT xx.xx.xx.xx:80
at Function.AxiosError.from (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/node_modules/axios/lib/core/AxiosError.js:89:14)
at RedirectableRequest.handleRequestError (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/node_modules/axios/lib/adapters/http.js:533:25)
at RedirectableRequest.emit (node:events:514:28)
at ClientRequest.eventHandlers. (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/node_modules/follow-redirects/index.js:14:24)
at ClientRequest.emit (node:events:514:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:514:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
port: 80,
address: 'xx.xx.xx.xx',
syscall: 'connect',
code: 'ETIMEDOUT',
errno: -110,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function], Blob: [class Blob] },
validateStatus: [Function: validateStatus],
headers: AxiosHeaders {
Accept: 'application/json, text/plain, /',
'Content-Type': 'application/json',
'User-Agent': 'axios/1.2.2',
'Content-Length': '352',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
method: 'post',
url: 'http://xx.xx.xx.xx/app',
data: '{"method":"handshake","params":{"key":"-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGKIb3DQEBAQUAA4GNADCBiQKBgQDChYLmRePB7ZdIxd7L2/WdkGYn\n9b2jbOlWt3SMg3X6w5Cb9uD4YJcECXPac5eslGFB0K239NSAM/RS2QjViqOEF2c4\n8kfuBcsbqWNp/WJLVF3AH/mIH0fNDjdomKQoR3Zs7/3Bw1eW+g8Am3W/0eRBCbdz\nvdjLB9DpuUMa9WcfSwIDAQAB\n-----END PUBLIC KEY-----\n"},"requestTimeMils":1692951346309}'
},
request: <ref *1> Writable {
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 0,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
_events: [Object: null prototype] {
response: [Function: handleResponse],
error: [Function: handleRequestError],
socket: [Function: handleRequestSocket]
},
_eventsCount: 3,
_maxListeners: undefined,
_options: {
maxRedirects: 21,
maxBodyLength: Infinity,
protocol: 'http:',
path: '/app',
method: 'POST',
headers: [Object: null prototype],
agents: [Object],
auth: undefined,
beforeRedirect: [Function: dispatchBeforeRedirect],
beforeRedirects: [Object],
hostname: 'xx.xx.xx.xx',
port: '',
agent: undefined,
nativeProtocols: [Object],
pathname: '/app'
},
_ended: false,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 352,
_requestBodyBuffers: [ [Object] ],
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: '352',
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: true,
_closed: false,
socket: [Socket],
_header: 'POST /app HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Content-Type: application/json\r\n' +
'User-Agent: axios/1.2.2\r\n' +
'Content-Length: 352\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: xx.xx.xx.xx\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/app',
_ended: false,
res: null,
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'xx.xx.xx.xx',
protocol: 'http:',
_redirectable: [Circular *1],
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'http://xx.xx.xx.xx/app',
[Symbol(kCapture)]: false
},
cause: Error: connect ETIMEDOUT xx.xx.xx.xx:80
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) {
errno: -110,
code: 'ETIMEDOUT',
syscall: 'connect',
address: 'xx.xx.xx.xx',
port: 80
}
}
[25/08/2023, 09:17:57] [TPLink Tapo Platform] Failed to get info about: xx.xx.xx.xx | The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined

I have the same issue found on the TPlink Light Bulb:
Model: Tapo L530
Hardware version: 2.0
Firmware Version: 1.10 Build 230721 Rel.224802
Homebridge v1.6.1
Node.js 16.20.2
OS: Synology DSM
Error Log shown:

Is there any hotfix that can be done? If anyone has anything please do update, struggling with my automation & scenes.
😭

Same issue today with L510
[25/08/2023, 19:42:06] [Tapo Homebridge] Error sending command: deviceInfo TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at new NodeError (node:internal/errors:399:5)
at Function.from (node:buffer:339:9)
at TPLink.decodeHandshakeKey (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:333:31)
at TPLink.handshake (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:325:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TPLink.sendSecureRequest (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:251:7)
at TPLink.login (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:202:22)
at TPLink.sendCommandWithNoLock (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:130:9) {
code: 'ERR_INVALID_ARG_TYPE'

I have the same issue.  I have 2 bulbs.  Both work OK in the Tapo app.
Model: Tapo L530
Hardware Version: 2.0
Firmware Version: 1.1.0
Homebridge Version: 1.6.1
Node.js Version: 18.16.0
Mac OS 12.6.8
[8/26/2023, 1:34:37 PM] [TPLink Tapo] Failed to get info about: <IP_ADDRESS> | The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
[8/26/2023, 1:34:37 PM] [TPLink Tapo] Retry to connect in 10s : <IP_ADDRESS>
[8/26/2023, 1:34:46 PM] [TPLink Tapo] Try for <IP_ADDRESS> : 1/20
[8/26/2023, 1:34:46 PM] [TPLink Tapo] Error sending command: deviceInfo TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at new NodeError (node:internal/errors:399:5)
at Function.from (node:buffer:339:9)
at TPLink.decodeHandshakeKey (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:333:31)
at TPLink.handshake (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:325:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TPLink.sendSecureRequest (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:251:7)
at TPLink.login (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:202:22)
at TPLink.sendCommandWithNoLock (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:130:9) {
code: 'ERR_INVALID_ARG_TYPE'
}
[8/26/2023, 1:34:46 PM] [TPLink Tapo] Failed to get info about: <IP_ADDRESS> | The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
[8/26/2023, 1:34:46 PM] [TPLink Tapo] Retry timeout: <IP_ADDRESS>
[8/26/2023, 1:34:47 PM] [TPLink Tapo] Try for <IP_ADDRESS> : 1/20
[8/26/2023, 1:34:47 PM] [TPLink Tapo] Error sending command: deviceInfo TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at new NodeError (node:internal/errors:399:5)
at Function.from (node:buffer:339:9)
at TPLink.decodeHandshakeKey (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:333:31)
at TPLink.handshake (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:325:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TPLink.sendSecureRequest (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:251:7)
at TPLink.login (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:202:22)
at TPLink.sendCommandWithNoLock (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:130:9) {
code: 'ERR_INVALID_ARG_TYPE'

It looks like it changed the endpoint to get the key from the handshake.
Capturing with wireshark I see that it is using a POST to /app/handshake2 with the content application/x-www-form-urlencoded and no longer to /app with content application/json. Lamps in version 1 are still using /app with content application/json.

It looks like it changed the endpoint to get the key from the handshake.
Capturing with wireshark I see that it is using a POST to /app/handshake2 with the content application/x-www-form-urlencoded and no longer to /app with content application/json. Lamps in version 1 are still using /app with content application/json.

Hello, thank you for the research, next week i will be able to work on it

Same issue. My Tapo lights and smart plug are very erratic since last week:
[29/08/2023, 16:27:48] [HomebridgeTPLinkTapo] Failed to get info about: <IP_ADDRESS> | The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
[29/08/2023, 16:27:48] [HomebridgeTPLinkTapo] Retry timeout: <IP_ADDRESS>
[29/08/2023, 16:27:48] [HomebridgeTPLinkTapo] Try for <IP_ADDRESS> : 1/20
[29/08/2023, 16:27:49] [HomebridgeTPLinkTapo] Error sending command: deviceInfo TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at new NodeError (node:internal/errors:399:5)
at Function.from (node:buffer:339:9)
at TPLink.decodeHandshakeKey (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:333:31)
at TPLink.handshake (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:325:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TPLink.sendSecureRequest (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:251:7)
at TPLink.login (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:202:22)
at TPLink.sendCommandWithNoLock (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:130:9) {
code: 'ERR_INVALID_ARG_TYPE'
}
[29/08/2023, 16:27:49] [HomebridgeTPLinkTapo] Failed to get info about: <IP_ADDRESS> | The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
[29/08/2023, 16:27:49] [HomebridgeTPLinkTapo] Retry timeout: <IP_ADDRESS>
[29/08/2023, 16:27:51] [HomebridgeTPLinkTapo] Try for <IP_ADDRESS> : 1/20
[29/08/2023, 16:27:51] [HomebridgeTPLinkTapo] Error sending command: deviceInfo TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at new NodeError (node:internal/errors:399:5)
at Function.from (node:buffer:339:9)
at TPLink.decodeHandshakeKey (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:333:31)
at TPLink.handshake (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:325:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TPLink.sendSecureRequest (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:251:7)
at TPLink.login (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:202:22)
at TPLink.sendCommandWithNoLock (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:130:9) {
code: 'ERR_INVALID_ARG_TYPE'
}

Having the same issue but only in one of the Tapo lamps (L530E). The others are working as expected. Exact similar error log with the others.

Same issue here..
Working bulb:
L530
Hardware Version 1.0.0
Firmware Version 1.2.2 Build 20220110 Rel. 72329 (has a firmware update available)
Not Working bulb:
L530
Hardware Version 2.0
Firmware Version 11.0 Build 230721 Rel.224802

I will take a look on it today

Can someone with those errors to run this command in terminal and see the output? Replace ip-here with the device ip and send the response but without the key
curl --location 'http://ip-here/app' \
--header 'Content-Type: application/json' \
--data '{
    "method": "handshake",
    "params": {
        "key": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDqqcZUc+O4VIxqCsvrJ7OVJJMM\n2rJtpevPcI99oJ2yaRXqK/DrFg4Pt+j4LQIMuvWxGEJc4tQRHb15+o+/eMghjkO7\nELp7AR6TRMNB4RHn1i8wr1U7VRi/4E3thXuKnAGBbNLUwrexqVdIrHiAsvDcUHSC\n6sRMBAhiQxbk3ilUVQIDAQAB\n-----END PUBLIC KEY-----"
    },
    "requestTimeMils": "2023-08-31T08:52:59.015Z"
}'

Expected response:
{
    "error_code": 0,
    "result": {
        "key":  "private"
    }
}

Same issue. My Tapo lights and smart plug are very erratic since last week:
[29/08/2023, 16:27:48] [HomebridgeTPLinkTapo] Failed to get info about: <IP_ADDRESS> | The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined [29/08/2023, 16:27:48] [HomebridgeTPLinkTapo] Retry timeout: <IP_ADDRESS> [29/08/2023, 16:27:48] [HomebridgeTPLinkTapo] Try for <IP_ADDRESS> : 1/20 [29/08/2023, 16:27:49] [HomebridgeTPLinkTapo] Error sending command: deviceInfo TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined at new NodeError (node:internal/errors:399:5) at Function.from (node:buffer:339:9) at TPLink.decodeHandshakeKey (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:333:31) at TPLink.handshake (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:325:30) at processTicksAndRejections (node:internal/process/task_queues:95:5) at TPLink.sendSecureRequest (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:251:7) at TPLink.login (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:202:22) at TPLink.sendCommandWithNoLock (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:130:9) { code: 'ERR_INVALID_ARG_TYPE' } [29/08/2023, 16:27:49] [HomebridgeTPLinkTapo] Failed to get info about: <IP_ADDRESS> | The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined [29/08/2023, 16:27:49] [HomebridgeTPLinkTapo] Retry timeout: <IP_ADDRESS> [29/08/2023, 16:27:51] [HomebridgeTPLinkTapo] Try for <IP_ADDRESS> : 1/20 [29/08/2023, 16:27:51] [HomebridgeTPLinkTapo] Error sending command: deviceInfo TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined at new NodeError (node:internal/errors:399:5) at Function.from (node:buffer:339:9) at TPLink.decodeHandshakeKey (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:333:31) at TPLink.handshake (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:325:30) at processTicksAndRejections (node:internal/process/task_queues:95:5) at TPLink.sendSecureRequest (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:251:7) at TPLink.login (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:202:22) at TPLink.sendCommandWithNoLock (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:130:9) { code: 'ERR_INVALID_ARG_TYPE' }

What smart plug do you have? i also have one and it works as expected and just to confirm, do you have any KASA devices?

meone with those errors to run this command in terminal and see the outpu

I will run this test now, just give me a second :)

Can someone with those errors to run this command in terminal and see the output? Replace ip-here with the device ip and send the response but without the key
curl --location 'http://ip-here/app' \
--header 'Content-Type: application/json' \
--data '{
    "method": "handshake",
    "params": {
        "key": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDqqcZUc+O4VIxqCsvrJ7OVJJMM\n2rJtpevPcI99oJ2yaRXqK/DrFg4Pt+j4LQIMuvWxGEJc4tQRHb15+o+/eMghjkO7\nELp7AR6TRMNB4RHn1i8wr1U7VRi/4E3thXuKnAGBbNLUwrexqVdIrHiAsvDcUHSC\n6sRMBAhiQxbk3ilUVQIDAQAB\n-----END PUBLIC KEY-----"
    },
    "requestTimeMils": "2023-08-31T08:52:59.015Z"
}'

Expected response:
{
    "error_code": 0,
    "result": {
        "key":  "private"
    }
}

{"error_code":0,"result":{"key":""}}

{"error_code":0,"result":{"key":""}} - Same result

{"error_code":0,"result":{"key":""}} - Same result

from the responses it looks like the handshake is not an issue

It looks like it changed the endpoint to get the key from the handshake.
Capturing with wireshark I see that it is using a POST to /app/handshake2 with the content application/x-www-form-urlencoded and no longer to /app with content application/json. Bulbs in version 1 are still using /app with content application/json.

Do you have KASA devices? those are the ones that use handshake2

{"error_code":0,"result":{"key":""}} - Same result

from the responses it looks like the handshake is not an issue

So are there any other tests that we can do to help you? I personally don't have any Kasa devices unfortunately

Could it be the recent firmware upgrade that caused this? It appears so in a homeassistant thread:
Link

Reading through that documentation, it seems that TP-Link has introduced a new protocol (Klap Protocol) to fix some security vulnerability on their lightbulbs. @RaresAil is there anything else we can do to help you resolve the issue? You are our superhero here at the moment!

Hmm, if they added Klap it means that the light bulb is similar to Kasa devices, can you try this plugin with that bulb only? this plugin is for the Kasa Devices:
https://www.npmjs.com/package/homebridge-tplink-smarthome

Hmm, if they added Klap it means that the light bulb is similar to Kasa devices, can you try this plugin with that bulb only? this plugin is for the Kasa Devices:
https://www.npmjs.com/package/homebridge-tplink-smarthome

Gave it a try, that app doesn't seem to detect any of my L530 devices :(

Good morning @RaresAil - do we have any more info on this? I would love to get my smart home back to it's fully operational state!

@WollfWizard Starting with 3.4.0 (not yet released) will fix an error but i am not sure if it will still work, in that case it might take longer to fix it as i need to add KLAP support

@WollfWizard Starting with 3.4.0 (not yet released) will fix an error but i am not sure if it will still work, in that case it might take longer to fix it as i need to add KLAP support

You are a rockstar! Please let me know if there is anything I can do to help test, make changes etc etc. I am here and available all day! (UTC+2 / GMT+2)

Can someone with those errors to run this command in terminal and see the output? Replace ip-here with the device ip and send the response but without the key
curl --location 'http://ip-here/app' \
--header 'Content-Type: application/json' \
--data '{
    "method": "handshake",
    "params": {
        "key": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDqqcZUc+O4VIxqCsvrJ7OVJJMM\n2rJtpevPcI99oJ2yaRXqK/DrFg4Pt+j4LQIMuvWxGEJc4tQRHb15+o+/eMghjkO7\nELp7AR6TRMNB4RHn1i8wr1U7VRi/4E3thXuKnAGBbNLUwrexqVdIrHiAsvDcUHSC\n6sRMBAhiQxbk3ilUVQIDAQAB\n-----END PUBLIC KEY-----"
    },
    "requestTimeMils": "2023-08-31T08:52:59.015Z"
}'

Expected response:
{
    "error_code": 0,
    "result": {
        "key":  "private"
    }
}

A bit delayed answer but it might help.
In my case I get {"error_code":1003} as a responses. After a day or so my L520 stopped working also (I guess it got an automatic update).
I have a Kasa device and this is still working properly, but the Kasa plugin does not detect the Tp-Link lamps. Looking forward for the 3.4.0 version to check if this might help.

Good to know this isn't just me then.
Any kind of ETA?

Hi @RaresAil here is the results from my Mac Mini:
WollfWizard@Owens-Mac-mini ~ % curl --location 'http://<IP_ADDRESS>/app'
--header 'Content-Type: application/json'
--data '{
"method": "component_nego",
"requestTimeMils": "0"
}'
{"error_code":1003}%                                                                                WollfWizard@Owens-Mac-mini ~ %
Please let me know if there are any other tests needed, I would like to gain this functionality back as soon as possible :)

Querying one of my L510's
{"error_code":1003}

pi@homebridge:/var/lib/homebridge $ curl --location 'http://<IP_ADDRESS>/app' /<IP_ADDRESS>/app'
--header 'Content-Type: application/json'
--data '{
"method": "component_nego",
"requestTimeMils": "0"
}'
200 OKbash: --header: command not found
bash: --data: command not found
pi@homebridge:/var/lib/homebridge $
pi@homebridge:/var/lib/homebridge $ curl --location 'http://<IP_ADDRESS>/app'
--header 'Content-Type: application/json'
--data '{
"method": "component_nego",
"requestTimeMils": "0"
}'
200 OKbash: --header: command not found
bash: --data: command not found
pi@homebridge:/var/lib/homebridge $
did this help?

I have L530E and if you want I can make same check with curl

I have an old bulb, i just need an adaptor from E14 to E27 to can use it and i will be able to add the support

Not yet an ETA, most likely in 3.4.0 it will ignore the device and in 4.0.0 i will add the support for the new protocol, i will still ask here for extra info, and one request that i have, can you run this in a Mac/Linux (idk how is for Window) terminal or from the Homebridge terminal:
curl --location 'http://ip-of-light/app' \
--header 'Content-Type: application/json' \
--data '{
    "method": "component_nego",
    "requestTimeMils": "0"
}'

In my case both L510 and L530 are responding {"error_code":1003}. However the P110 plug keeps working as expected with the plugin, both 3.3.0 and 3.4.0 versions and responds 200 OK

I have an old bulb, i just need an adaptor from E14 to E27 to can use it and i will be able to add the support

@RaresAil what can we do to help with this?
PS I have donated towards this project on Revolut.

I have an old bulb, i just need an adaptor from E14 to E27 to can use it and i will be able to add the support

@RaresAil what can we do to help with this?
PS I have donated towards this project on Revolut.

I saw, thank you 😄, i will let you guys know, i hope by Sunday to have the this working again

same issue L610 and 630

Can you guys try this request?
curl --location --request POST 'http://ip-here/app/handshake1'

Hey @RaresAil - I ran the request, however, it provided no result at all. Please see screenshot below:
https://github.com/RaresAil/homebridge-tp-link-tapo/assets/62695658/8ccaaa81-e95d-4f0c-82c3-101eec8c9492

I’m testing whilst mobile so I can’t easily copy the terminal but like @WollfWizard, I don’t see any output.

Can you try from postman?

@RaresAil Unfortunately I do not have Postman (and don't currently have the funds to get a subscription), however, I can setup a VPN connection for you through my dedicated home IP so you can test on my infrastructure with my lights through postman? Let me know if this would work for you, and if yes, please reach out to me privately here: https://altm.3cx.co.za:5001/LiveChat35582

@RaresAil
Against L530
curl --location --request POST 'http://<IP_ADDRESS>/app/handshake1'

HTTP/1.1 400 Bad Request
Server: SHIP 2.0
Content-Length: 0
Content-Type: text/html

Against P110
curl --location --request POST 'http://<IP_ADDRESS>/app/handshake1'

HTTP/1.1 200 OK
Server: SHIP 2.0
Content-Length: 49
Content-Type: text/html

<html><body><center>200 OK</center></body></html>

Can you try from postman?

I could try it but later today or tomorrow. I will let you know if I manage to do it.

  L530 bulb

Console log:
POST http://<IP_ADDRESS>/app/handshake1: {
  "Network": {
    "addresses": {
      "local": {
        "address": "<IP_ADDRESS>",
        "family": "IPv4",
        "port": 65112
      },
      "remote": {
        "address": "<IP_ADDRESS>",
        "family": "IPv4",
        "port": 80
      }
    }
  },
  "Request Headers": {
    "user-agent": "PostmanRuntime/7.32.3",
    "accept": "*/*",
    "postman-token": "44f3d081-a0cd-44a1-89ad-ab9234d6f249",
    "host": "<IP_ADDRESS>",
    "accept-encoding": "gzip, deflate, br",
    "connection": "keep-alive",
    "content-length": "0"
  },
  "Response Headers": {
    "server": "SHIP 2.0",
    "content-length": "0",
    "content-type": "text/html"
  }
}

With cURL

@RaresAil Unfortunately I do not have Postman (and don't currently have the funds to get a subscription), however, I can setup a VPN connection for you through my dedicated home IP so you can test on my infrastructure with my lights through postman? Let me know if this would work for you, and if yes, please reach out to me privately here: https://altm.3cx.co.za:5001/LiveChat35582

Postman is free 😄

@RaresAil Unfortunately I do not have Postman (and don't currently have the funds to get a subscription), however, I can setup a VPN connection for you through my dedicated home IP so you can test on my infrastructure with my lights through postman? Let me know if this would work for you, and if yes, please reach out to me privately here: https://altm.3cx.co.za:5001/LiveChat35582

Postman is free 😄

@RaresAil After some fiddling about I managed to get it up and running! I previously has a paid for account, and didn't know there was a free option. Please see the results. I am getting a Bad Request.

Not yet an ETA, most likely in 3.4.0 it will ignore the device and in 4.0.0 i will add the support for the new protocol, i will still ask here for extra info, and one request that i have, can you run this in a Mac/Linux (idk how is for Window) terminal or from the Homebridge terminal:

curl --location 'http://ip-of-light/app' \

--header 'Content-Type: application/json' \

--data '{

    "method": "component_nego",

    "requestTimeMils": "0"

}'

For people that have the response OK from the lights with the prev command, does this command also shows OK? If this does shows OK it means that the app should work fine for you

@RaresAil Unfortunately I do not have Postman (and don't currently have the funds to get a subscription), however, I can setup a VPN connection for you through my dedicated home IP so you can test on my infrastructure with my lights through postman? Let me know if this would work for you, and if yes, please reach out to me privately here: https://altm.3cx.co.za:5001/LiveChat35582

Postman is free 😄

@RaresAil After some fiddling about I managed to get it up and running! I previously has a paid for account, and didn't know there was a free option. Please see the results. I am getting a Bad Request.

Is very wierd, some users have 400, some OK, the OK means that the plugin should work for them, i have 404 which is even weirder

And from my plugin, what errors do you get?

this? ....

this? ....

Is that the version 3.3.0?

3.4

3.4

Can you provide a ss from the tapo app for that light?

@RaresAil
Tapo L510 1.1.0 Build 230721 Rel.224802

curl --location --request --verbose POST 'http://<IP_ADDRESS>/app/handshake1'

curl: (6) Could not resolve host: POST

<html><body><center>200 OK</center></body></html>%

Put the POST immediately after the --request flag

My bad:
~ curl --location --verbose --request POST 'http://<IP_ADDRESS>/app/handshake1'
*   Trying <IP_ADDRESS>:80...
* Connected to <IP_ADDRESS> (<IP_ADDRESS>) port 80 (#0)
> POST /app/handshake1 HTTP/1.1
> Host: <IP_ADDRESS>
> User-Agent: curl/7.86.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Server: SHIP 2.0
< Content-Length: 0
< Content-Type: text/html
<
* Connection #0 to host <IP_ADDRESS> left intact
*

Does your light have a name defined in the app?

Yea they do.

Tested both Postman and Curl, got the same results with the others
400 Bad Request
Tried also to remove the lamp from the Tapo app and add again, no change.
This is the error log from Homebridge, in case it helps:
[09/09/2023, 19:49:41] [TPLink Tapo] Error sending command: deviceInfo TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined     at new NodeError (node:internal/errors:405:5)     at Function.from (node:buffer:333:9)     at LegacyAPI.decodeHandshakeKey (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/LegacyAPI.ts:161:31)     at LegacyAPI.handshake (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/LegacyAPI.ts:153:30)     at processTicksAndRejections (node:internal/process/task_queues:95:5)     at LegacyAPI.sendSecureRequest (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/LegacyAPI.ts:75:7)     at LegacyAPI.login (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/LegacyAPI.ts:19:22)     at TPLink.sendCommandWithNoLock (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:195:9) {   code: 'ERR_INVALID_ARG_TYPE' }
Mine also have a name in the app, but you can't leave it empty, you have to write something on the name field.

So, for the users that received Bad Request from handshake1, KLAP protocol will fix it, the ones with OK is a totally different issue that I don't know yet, is anyone that received 404?

So, for the users that received Bad Request from handshake1, KLAP protocol will fix it, the ones with OK is a totally different issue that I don't know yet, is anyone that received 404?

That sounds like a step in the right direction! 😁 Any chance of an eta on v4.0?

So, for the users that received Bad Request from handshake1, KLAP protocol will fix it, the ones with OK is a totally different issue that I don't know yet, is anyone that received 404?

Differences in responses could be due to firmware version, maybe?

So, for the users that received Bad Request from handshake1, KLAP protocol will fix it, the ones with OK is a totally different issue that I don't know yet, is anyone that received 404?

That sounds like a step in the right direction! 😁 Any chance of an eta on v4.0?

Unknown yet, are you on discord? I might ask you to run locally a version of the new plugin to test it, cause my bulb says 404, and if is 404 is not KLAP but also not working with the normal one, is strange

So, for the users that received Bad Request from handshake1, KLAP protocol will fix it, the ones with OK is a totally different issue that I don't know yet, is anyone that received 404?

Differences in responses could be due to firmware version, maybe?

Different responses means different APIs, 200 should be the one that the plugin is using now but is still not working, 400 is KLAP and 404 i have no idea what it is

So, for the users that received Bad Request from handshake1, KLAP protocol will fix it, the ones with OK is a totally different issue that I don't know yet, is anyone that received 404?

Differences in responses could be due to firmware version, maybe?

Different responses means different APIs, 200 should be the one that the plugin is using now but is still not working, 400 is KLAP and 404 i have no idea what it is

Well yeah, I meant maybe newer firmware changes the API, which obviously seems to be the case due to the change to KLAP.
Anyways if I can help you in any way let me know!

I think TP Link just pushed an update for the L510's as well, as mine have been working fine up until now. Now none of my Tapo lights work in Homebridge :(

I think TP Link just pushed an update for the L510's as well, as mine have been working fine up until now. Now none of my Tapo lights work in Homebridge :(

Can you run the handshake1 command kn that one? Also, i think it will be easier if we speak on discord, join the server from readme

Is update still expected today (Sunday) @RaresAil .. Many thanks for the efforts.

Is update still expected today (Sunday) @RaresAil .. Many thanks for the efforts.

Sadly no, is harder than I expected

@RaresAil  Hi - I have the same issue, happy to assist with any troubleshooting or testing. Running HomeBridge v1.6.1.

Hey @chrisbudden you can join the discord server and help, the guys that are there, i asked them to run a dev version of the plugin locally

Hey everyone, this issue has been fixed in v4.0.0, please update to that version 🎉

Thanks for the efforts getting this to work ! much appreciated

Cheers for the hard work, sent you £5

Hey, thank you, i will include your name as well in the release :D

Cheers for the hard work, sent you £5

Hey, thank you, i will include your name as well in the release :D
EDIT: Added :D

not necessary - but thanks :)

You fixed it! Where is the tip jar link?
Thanks so much for your relatively unpaid work

From: somefool @.>
Sent: Wednesday, September 13, 2023 11:31:51 PM
To: RaresAil/homebridge-tp-link-tapo @.>
Cc: WizardOfOzzie @.>; Comment @.>
Subject: Re: [RaresAil/homebridge-tp-link-tapo] Issue with TPLink Tapo LED Bulb (Issue #49)
Cheers for the hard work, sent you £5
Hey, thank you, i will include your name as well in the release :D
EDIT: Added :D
not necessary - but thanks :)
—
Reply to this email directly, view it on GitHubhttps://github.com/RaresAil/homebridge-tp-link-tapo/issues/49#issuecomment-1717643482, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBJVKYO7FXWEYL5FRLEP2LX2GYUPANCNFSM6AAAAAA35GMKEE.
You are receiving this because you commented.Message ID: @.***>

You fixed it! Where is the tip jar link?
Thanks so much for your relatively unpaid work

From: somefool @.***>
Sent: Wednesday, September 13, 2023 11:31:51 PM
To: RaresAil/homebridge-tp-link-tapo @.***>
Cc: WizardOfOzzie @.>; Comment @.>
Subject: Re: [RaresAil/homebridge-tp-link-tapo] Issue with TPLink Tapo LED Bulb (Issue #49)
Cheers for the hard work, sent you £5
Hey, thank you, i will include your name as well in the release :D
EDIT: Added :D
not necessary - but thanks :)
—
Reply to this email directly, view it on GitHubhttps://github.com/RaresAil/homebridge-tp-link-tapo/issues/49#issuecomment-1717643482, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBJVKYO7FXWEYL5FRLEP2LX2GYUPANCNFSM6AAAAAA35GMKEE.
You are receiving this because you commented.Message ID: @.***>

Hey, thank you, glad it works for everyone 😄, links are on github and in homebridge should be a link as well


Specify horizontal dimensions on Adaptive Discretization

While describing the adaptive discretization algorithm, would be better to replace "each dimension" for "latitudinal and longitudinal dimensions" in order to make extra clear that we are applying only a two dimensional adaptive discretization, splitting only on the horizontal ones.

The required change should be applied on the first Step of the Adaptive Discretization algorithm.


Edit procedure on GreenPlum

Serge,
Greenplum do not have pg_get_functiondef, and in we're not able to edit stored procedures with DBeaver.
A solution should be as stated on https://groups.google.com/a/greenplum.org/forum/#!topic/gpdb-users/xHafRmKNW78
From a GUI tool, get the function definition using pgAdmin III or Aginity Workbench for Pivotal Greenplum, which are the two main GUI tools for working with Greenplum.
From the command line, you can use psql, but as already said it won't give the full CREATE FUNCTION statement:
\a
\o .sql
\df+ .
\o
To get the full CREATE FUNCTION statement from the command line you can use pg_dump and pg_restore:

create a dump file containing all the objects of the schema containing your function(s):
pg_dump -h  -U  -n  -Fc -s  > dump.dmp

search the function definition including its argument list within the dump file:
pg_restore -l dump.dmp | grep

extract the function definition from the dump file:
pg_restore -P '(arguments list)' dump.dmp > .sql

I do not know it should be interested to include on DBeaver, but sure should be and enhancer.
Many thanks

I think that making database dump just to get a procedure body is a bit too heavy solution.

Sometimes there is no local PostgreSQL client (psql, pg_dump) installed
Export may take hours in case of big database.
There should be some other way. As I understood they have a plan to merge with recent PostgreSQL codebase changes - this will give access to pg_get_functiondef.

Greenplum 4.3 do not support it and will not support in the near feature. A solution should be as in PGadminIII. It's has two method to retrieve the procedures one is for old versions and one for new ones. ( from pgFunctions.cpp)
if (obj->GetConnection()->GetIsGreenplum())
{
// the Open Source version of Greenplum already has the pg_get_function_result() function,
// however the 4.3 stable release does not have this function
functions = obj->GetDatabase()->ExecuteSet(
wxT("SELECT pr.oid, pr.xmin, pr., format_type(TYP.oid, NULL) AS typname, typns.nspname AS typnsp, lanname, ") +
argNamesCol  + argDefsCol + proConfigCol + proType +
wxT("       pg_get_userbyid(proowner) as funcowner, description") + seclab + wxT("\n")
wxT("  FROM pg_proc pr\n")
wxT("  JOIN pg_type typ ON typ.oid=prorettype\n")
wxT("  JOIN pg_namespace typns ON typns.oid=typ.typnamespace\n")
wxT("  JOIN pg_language lng ON lng.oid=prolang\n")
wxT("  LEFT OUTER JOIN pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)\n")
+ restriction +
wxT(" ORDER BY proname"));
}
else
{
// new code for !Greenplum
functions = obj->GetDatabase()->ExecuteSet(
wxT("SELECT pr.oid, pr.xmin, pr., pg_get_function_result(pr.oid) AS typname, typns.nspname AS typnsp, lanname, ") +
argNamesCol  + argDefsCol + proConfigCol + proType +
wxT("       pg_get_userbyid(proowner) as funcowner, description") + seclab + wxT("\n")
wxT("  FROM pg_proc pr\n")
wxT("  JOIN pg_type typ ON typ.oid=prorettype\n")
wxT("  JOIN pg_namespace typns ON typns.oid=typ.typnamespace\n")
wxT("  JOIN pg_language lng ON lng.oid=prolang\n")
wxT("  LEFT OUTER JOIN pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)\n")
+ restriction +
wxT(" ORDER BY proname"));
}
Best regards.

We have improved Greenplum support in last DBeaver versions.
Could you test how it works?

Eventually we'll add client-side function header generation in 5.2.4