Tuesday, April 30, 2019

conda list outdated packages

How to get a list of outdated/upgradeable/updatable packages in anaconda? The analogue of
pip list --outdated
ask conda to update all packages with the dry run flag (-d)
conda update --all -d
you get a large output like this:
Collecting package metadata: done
Solving environment: done

## Package Plan ##

  environment location: /media/nairboon/shared/software/anaconda3


The following packages will be downloaded:

    package              |            build
    ---------------------------|-----------------
    anaconda-navigator-1.9.7   |           py37_0         4.8 MB
    astroid-2.2.5                        |           py37_0         275 KB
    atomicwrites-1.3.0              |           py37_1          13 KB
....

   zict-0.1.4                              |           py37_0          20 KB
    zipp-0.3.3                            |           py37_1           9 KB
    ------------------------------------------------------------
                                           Total:       456.1 MB

The following NEW packages will be INSTALLED:

  pyrsistent         pkgs/main/linux-64::pyrsistent-0.14.11-py37h7b6447c_0
  soupsieve          pkgs/main/linux-64::soupsieve-1.8-py37_0
 ....
  sphinxcontrib-ser~ pkgs/main/noarch::sphinxcontrib-serializinghtml-1.1.3-py_0
  zipp               pkgs/main/linux-64::zipp-0.3.3-py37_1

The following packages will be UPDATED:

  anaconda-navigator                           1.9.6-py37_0 --> 1.9.7-py37_0
  astroid                                      2.1.0-py37_0 --> 2.2.5-py37_0
  atomicwrites                                 1.2.1-py37_0 --> 1.3.0-py37_1
  attrs                               18.2.0-py37h28b3542_0 --> 19.1.0-py37_1
  beautifulsoup4                               4.6.3-py37_0 --> 4.7.1-py37_1
  bitarray                             0.8.3-py37h14c3975_0 --> 0.9.0-py37h7b6447c_0
  bleach                                       3.0.2-py37_0 --> 3.1.0-py37_0
  blosc                                   1.14.4-hdbcaa40_0 --> 1.15.0-hd408876_0
  bokeh                                        1.0.2-py37_0 --> 1.1.0-py37_0


....
but at the last segment you'll find the list of packages that will be updated

Monday, January 28, 2019

"TypeError: Document not active" or "TypeError: The expression cannot be converted to return the specified type." Javascript Fullscreen API Error Messages:


Error message 

 

In a recent Firefox (64.0) you'll see this error:

TypeError: The expression cannot be converted to return the specified type.

in Chrome (71.0.x):

TypeError: Document not active

Cause

 

A rather meaningless and unhelpful error message occurs when one tries to exit fullscreen via javascript if the document isn't actually in fullscreen mode.


Solution


The solution is to check whether we are currently in fullscreen mode.


Snippet



Run it in jsfiddle, for testing the fullscreen mode.

See also

 

https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/fullscreenElement