problems with PyPlot on Jupyter-lab - matplotlib

I am starting getting this message when using PyPlot in Jupyter lab, tried Pkg.resolve() but it didn't help, does anyone knows how to fix this?
many thanks!!
using PyPlot
┌ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
└ # Base loading.jl:1278
┌ Warning: Package FixedPointNumbers does not have Statistics in its dependencies:
│ - If you have FixedPointNumbers checked out for development and have
│ added Statistics as a dependency but haven't updated your primary
│ environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with FixedPointNumbers
└ Loading Statistics into FixedPointNumbers from project dependency, future warnings for FixedPointNumbers are suppressed.

well, running Pkg.resolve() from the jupyter workbook fixed it, I had been trying from the REPL, as I thought it was equivalent, and it wasn't forking bu now is fine.

Related

Resteasy rest responses of quarkus app ignore jackson config quarkus.jackson.write-dates-as-timestamps=true

in the process of migrating a java app to quarkus, we have encountered that resteasy responses which include a java.util.Date object, are being converted to a Date String instead of a long timestamp in milliseconds.
According to the quarkus documentation, this default behavior is normal and can be disabled by putting quarkus.jackson.write-dates-as-timestamps=true in the application.properties file, but it seems to be ignored as the result stays a string date instead of a timestamp regardless of this config being set to true.
We also tried to set this config property explicitly via an ObjectMapperCustomizer, but that didn't work out either.
Quarkus version: 2.9.0
Any ideas how we can force timestamps for any resteasy response?
Affected Code: https://github.com/labsai/EDDI
EDIT:
I have added a resteasy endpoint with a test response containing a date to more easily reproduce the issue:
https://github.com/labsai/EDDI/blob/master/src/main/java/ai/labs/eddi/configs/Test.java
Start app with ./mvnw compile quarkus:dev (docker needs to be enabled, otherwise you need a mongodb up and running)
Then GET http://localhost:7070/test which results in {"date":"2022-05-16T07:49:13.001Z[UTC]"}
The reason you are seeing this behavior is because Jackson is not being used to serialize JSON.
Instead, JSON-B is handling that task.
quarkus-jsonb is getting included from the following tree:
[INFO] ├─ io.quarkiverse.microprofile:quarkus-microprofile-deployment:jar:2.7.2.Final (compile)
[INFO] │ ├─ io.quarkiverse.microprofile:quarkus-microprofile:jar:2.7.2.Final (compile)
[INFO] │ │ ├─ io.quarkus:quarkus-resteasy-jsonb:jar:2.9.0.Final (compile)
[INFO] │ │ │ ├─ io.quarkus:quarkus-jsonb:jar:2.9.0.Final (compile)
You can use one of Quarkus' ability to "hide" certain classpath resources.
quarkus.class-loading.removed-resources."org.jboss.resteasy\:resteasy-json-binding-provider"=org/jboss/resteasy/plugins/providers/jsonb/JsonBindingProvider.class
See this for more details.

stencil start causes "Error during css compilation by the primary engine:"

I've just set up the Stencil CLI on a new laptop. When I run stencil start I get the bellow error. It reads as if it's an issue with one of my scss files however, the exact same project runs fine on my two older computers. I haven't been able to find anything online relating to this error message or hinting at how I could begin to troubleshoot it. If anyone has any info it would be greatly appreciated.
Error during css compilation by the primary engine:
Error: Top-level selectors may not contain the parent selector "&".
╷
36 │ &::placeholder {
│ ^^^^^^^^^^^^^^^
╵
dh-custom/dh-global.scss 36:1 #import
dh-custom/dh-theme.scss 8:9 #import
stdin 94:9 root stylesheet
Will retry with a fallback engine
Stencil starts and runs Browsersync, however it randomly glitches and reloads itself.
I've tried using node 10.17, 10.24, 12.13, and 12.22.7.
The computer is an Apple MacBook Pro with an m1 max chip.
Thanks
https://github.com/sass/sass/issues/1873
Could it be you have a different set of npm packages installed on this laptop, and now the error is surfacing.

Getting error Invariant Violation: Tried to register two views with the same name

I have used react-native when it was 0.50 now I'm using it again and it's 0.61.1
I am making an app and using "react-navigation" library for routing.
Since I'm using the react-native-gesture-handler according to the documentation I'm getting the error sometimes of "Invariant Violation: Tried to register two views with the same name" and when I close the app and reopen it, it's gone.
And especially "Invariant Violation: Tried to register two views with the same name gestureHandlerRootView" error comes so many times in-app.
here is the screenshot of error in my console:
And because of this error, My app in release mode is also crashing as soon as I open it. I'm using React Native CLI not EXPO. I've searched in stack overflow and on other places but all the answers I got are saying remove react-native-gesture-handler from the expo.
But I'm not using EXPO what should I do? Please help.
I ran
npm ls react-native-webview
and was showed:
├─┬ react-native-webview-leaflet#5.0.2
│ └── react-native-webview#8.2.1
└── react-native-webview#11.0.2
Two webview.
I solve with:
yarn add react-native-webview-leaflet
That is, I had to reinstall 'react-native-webview-leaflet' probability because an update of 'react-native-webview'.
Try to do find . -name react-native-{name-of-the-package} and look for duplicates. They are probably detected and loaded each time (by use_native_modules), which leads to this error.
Try adjusting your dependencies (and look for deps of deps) to avoid such duplicated. At the end your adjustment should be visible in your lock file.

Chrome launching twice when running a Cucumber feature

I have a problem where Chrome driver is launching twice when I run a feature file.
I'm using Cucumber with Selenium Java using IntelliJ.
The problem came about when I created a new stepdef file for a new area of functionality that I'm working on. So I'm pretty sure this is something to do with how the features are linked to step defs. I'm still learning the ropes here so this is an area I haven't had much experience in.
My Step Defs each come with #Before code to run before every stepdef method and the #Before code contains a
driver.get("https://mywebsite_under_test");
This website URL is different for each of the two StepDef files.
When I launch my test I can see that the two chrome sessions it starts are the ones mentioned in the #Before of each Step Def file. I'm launching from the IDE where I just run the feature.
My project structure is as follows:
├───main
│ ├───java
│ └───resources
└───test
├───java
│ ├───Database
│ ├───Pages
│ └───stepdefs
│ ├───MOPStepDefs
│ └───MOSStepDefs
└───Resources
├───MOP Features
└───MOS Features
I'm out of ideas here. I've messed about with Glue value in the Config but not getting any luck.
With your before tag add the scenario tag so it only runs when you run that scenario i.e. #Before("#MOP") where #MOP is a tag of your feature or scenario. In your instance the syntax should be #Before("#Automated, #MOP")

OMP warning when numpy 1.8.0 is packaged with py2exe

import numpy
When I packaged above one line script as a single executable window application using py2exe, I get following warnings upon launch.
OMP: Warning #178: Function GetModuleHandleEx failed:
OMP: System error #126: The specified module could not be found.
This warning happen only when I build as single executable (i.e., only when bundle_files=1). Here's my setup.py for this.
from distutils.core import setup
import py2exe
setup(
options = {'py2exe': {'bundle_files': 1}},
windows=['testnumpy.py'],
zipfile = None,
)
This problem started with numpy 1.8.0. When I revert back to 1.6.2, the warnings don't show up.
Usually a single executable packaged by py2exe will catch warnings and traceback and save them into a log file. But somehow these warnings are not captured and the app creates a console window to show warning. I want to suppress this additional console window to show up.
How can I fix this warning problem?
What I tried (nothing worked):
I tried this redirecting sys.stderr.
I searched github numpy source for openMP assuming the OMP stands for it as mentioned here. But, nothing useful came out.
I have copied libiomp5md.dll to the same folder as setup.py.
I tried filterwarnings:
I tried sys.excepthook.
As I wrote in the comment, installing numpy 1.8.1rc1 from sourceforge did fix the issue, although I don't really know the differences...
I had this issue with numpy 1.13.1+mkl and scipy 1.19.1. Reverting to numpy 1.8.1rc1 is not an acceptable solution.
I tracked this issue to the scipy.integrate subpackage. The warning message pops up when this package is imported. It seems that perhaps libraries that use MKL don't like being invoked from library.zip, which is where py2exe places packages when using bundle option 2.
The solution is to exclude scipy and numpy in the py2exe setup script and copy their entire package folders into the distribution directory and add that directory to the system path at the top of the main python script.