text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=adeveloper" rel="nofollow">Jack Woods</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7895?redirect=false" rel="nofollow">SPR-7895</a></strong> and commented</p>
<p dir="auto">Custom message converters registered with AnnotationMethodHandlerAdapter are not used, only the default ones registered with <mvc:annotation-driven /> are used. I found that the setMessageConverters() method of AnnotationMethodHandlerAdapter class is called two times, one for the default and another one for the bean defined in the spring xml file. The one defined in the spring xml file is never used when doing actual marshalling and unmarshalling.</p>
<p dir="auto">For example the following jibx message converter is not used:</p>
<p dir="auto"><bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><br>
<property name="messageConverters"><br>
<util:list id="beanList"><br>
<ref bean="marshallingHttpMessageConverter" /><br>
</util:list><br>
</property><br>
</bean><br>
<bean id="marshallingHttpMessageConverter" class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter"><br>
<constructor-arg ref="jixbUserMarshaller" /><br>
<property name="supportedMediaTypes" value="text/xml" /><br>
</bean></p>
<p dir="auto"><oxm:jibx-marshaller id="jixbUserMarshaller" target-class="com.company.restpoc.model.User" /></p>
<p dir="auto">In my opinion the jibx support in Spring OXM is rather poor. We need to define a separate converter for each target-class. We don't need to do that kind of thing when using Jersey with Jibx. We just need two <code class="notranslate">@Provider</code> classes that implement MessageBodyReader and MessageBodyWriter. I have attached JIBXBodyReader and JIBXBodyWriter for your reference.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5</p>
<p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springframework.org/showthread.php?t=100244" rel="nofollow">http://forum.springframework.org/showthread.php?t=100244</a></p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/17533/JIBXBodyReader.java" rel="nofollow">JIBXBodyReader.java</a> (<em>1.41 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/17532/JIBXBodyWriter.java" rel="nofollow">JIBXBodyWriter.java</a> (<em>1.57 kB</em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=frank" rel="nofollow">Frank Titius</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2406?redirect=false" rel="nofollow">SPR-2406</a></strong> and commented</p>
<p dir="auto">If you try to persist a new object (insert) with duplicate key you get:</p>
<p dir="auto">org.springframework.dao.InvalidDataAccessResourceUsageException: Could not invoke JDO makePersistent(Object) method; nested exception is javax.jdo.JDODataStoreException: Insert request failed: INSERT INTO <code class="notranslate">ACCOUNT</code> (<code class="notranslate">CITY</code>,<code class="notranslate">STATUS</code>,<code class="notranslate">PHONE</code>,<code class="notranslate">COUNTRY</code>,<code class="notranslate">EMAIL</code>,<code class="notranslate">LANGUAGE_PREFERENCE</code>,<code class="notranslate">LAST_NAME</code>,<code class="notranslate">ZIP</code>,<code class="notranslate">ADDRESS2</code>,<code class="notranslate">USERID</code>,<code class="notranslate">ADDRESS1</code>,<code class="notranslate">FIRST_NAME</code>,<code class="notranslate">PASSWORD</code>) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)<br>
NestedThrowables:<br>
java.sql.SQLException: Duplicate entry 'a' for key 2<br>
Caused by: javax.jdo.JDODataStoreException: Insert request failed: INSERT INTO <code class="notranslate">ACCOUNT</code> (<code class="notranslate">CITY</code>,<code class="notranslate">STATUS</code>,<code class="notranslate">PHONE</code>,<code class="notranslate">COUNTRY</code>,<code class="notranslate">EMAIL</code>,<code class="notranslate">LANGUAGE_PREFERENCE</code>,<code class="notranslate">LAST_NAME</code>,<code class="notranslate">ZIP</code>,<code class="notranslate">ADDRESS2</code>,<code class="notranslate">USERID</code>,<code class="notranslate">ADDRESS1</code>,<code class="notranslate">FIRST_NAME</code>,<code class="notranslate">PASSWORD</code>) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)<br>
at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:412)<br>
at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2379)<br>
at org.jpox.store.StoreManager.insert(StoreManager.java:775)<br>
at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3512)<br>
at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3485)<br>
at org.jpox.AbstractPersistenceManager.internalMakePersistent (AbstractPersistenceManager.java:1146)<br>
at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1201)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:585)<br>
at org.springframework.orm.jdo.JdoTemplate$9.doInJdo(JdoTemplate.java:406)<br>
at org.springframework.orm.jdo.JdoTemplate.execute(JdoTemplate.java:259)<br>
at org.springframework.orm.jdo.JdoTemplate.makePersistent(JdoTemplate.java:403)<br>
at improvit.web.skill.dao.jdo.JdoAccountDao.storeAccount(JdoAccountDao.java:48)<br>
at improvit.web.skill.dao.jdo.JdoAccountDao.insertAccount(JdoAccountDao.java:52)<br>
at improvit.web.skill.domain.logic.WebSkillImpl.insertAccount(WebSkillImpl.java:111)<br>
at improvit.web.skill.test.dao.AbstractAccountDaoTests.testDuplicateAccount(AbstractAccountDaoTests.java:123)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:585)<br>
at junit.framework.TestCase.runTest(TestCase.java:154)<br>
at junit.framework.TestCase.runBare(TestCase.java:127)<br>
at improvit.web.skill.test.dao.ConditionalTestCase.runBare(ConditionalTestCase.java:69)<br>
at junit.framework.TestResult$1.protect(TestResult.java:106)<br>
at junit.framework.TestResult.runProtected(TestResult.java:124)<br>
at junit.framework.TestResult.run(TestResult.java:109)<br>
at junit.framework.TestCase.run(TestCase.java:118)<br>
at junit.framework.TestSuite.runTest(TestSuite.java:208)<br>
at junit.framework.TestSuite.run(TestSuite.java:203)<br>
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)<br>
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)<br>
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)<br>
NestedThrowablesStackTrace:<br>
java.sql.SQLException: Duplicate entry 'a' for key 2<br>
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)<br>
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)<br>
at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124)<br>
at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)<br>
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:773)<br>
at org.jpox.store.rdbms.ParamLoggingPreparedStatement.execute(ParamLoggingPreparedStatement.java:213)<br>
at org.jpox.store.rdbms.request.Request.executeUpdate(Request.java:88)<br>
at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:283)<br>
at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2379)<br>
at org.jpox.store.StoreManager.insert(StoreManager.java:775)<br>
at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3512)<br>
at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3485)<br>
at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1146)<br>
at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1201)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:585)<br>
at org.springframework.orm.jdo.JdoTemplate$9.doInJdo(JdoTemplate.java:406)<br>
at org.springframework.orm.jdo.JdoTemplate.execute(JdoTemplate.java:259)<br>
at org.springframework.orm.jdo.JdoTemplate.makePersistent(JdoTemplate.java:403)<br>
.... (rest omitted)</p>
<p dir="auto">A "duplicate key" error should be translated to a DataIntegrityViolationException.<br>
Possible cause: First JPOX wraps a JDODataStoreException around the SQLException.<br>
Than reflection wrapped an InvocationTargetException and in JdoTemplate.makePersistent(..) the InvocationTargetException is caught which will prevent the translation in JdoTemplate.execute(..).</p>
<p dir="auto">Possible solution for ALL "catch (InvocationTargetException ex) " in JdoTemplate:</p>
<ul dir="auto">
<li>
<p dir="auto">before:<br>
catch (InvocationTargetException ex) {<br>
throw new InvalidDataAccessResourceUsageException(<br>
"Could not invoke JDO makePersistentAll(Collection) method", ex.getTargetException());<br>
}</p>
</li>
<li>
<p dir="auto">after:<br>
catch (InvocationTargetException ex) {<br>
if (ex.getTargetException() instanceof JDOException)<br>
throw (JDOException) ex.getTargetException();<br>
else<br>
throw new InvalidDataAccessResourceUsageException(<br>
"Could not invoke JDO makePersistentAll(Collection) method", ex.getTargetException());<br>
}</p>
</li>
</ul>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.2.8, 2.0 RC2, 2.0 RC3</p> | 0 |
<p dir="auto">I am having this problem when installing OpenCV3 in a virtual environment--</p>
<p dir="auto">[ 23%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o<br>
/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’:<br>
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope<br>
return (char *) memcpy (__dest, __src, __n) + __n;<br>
^<br>
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:266 (message):<br>
Error generating file<br>
/home/gamer/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o</p>
<p dir="auto">modules/core/CMakeFiles/opencv_core.dir/build.make:398: recipe for target 'modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o' failed<br>
make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o] Error 1<br>
CMakeFiles/Makefile2:2248: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed<br>
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2<br>
Makefile:149: recipe for target 'all' failed<br>
make: *** [all] Error 2</p>
<p dir="auto"><strong>My Cmake:</strong><br>
(.venv2) gamer@gamer:<del>/opencv/build$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=</del>/opencv_contrib/modules -D BUILD_EXAMPLES=ON ..</p>
<p dir="auto"><strong>General config:</strong></p>
<h2 dir="auto">-- General configuration for OpenCV 3.0.0 =====================================<br>
-- Version control: 3.0.0</h2>
<h2 dir="auto">-- Platform:<br>
-- Host: Linux 4.10.0-35-generic x86_64<br>
-- CMake: 3.5.1<br>
-- CMake generator: Unix Makefiles<br>
-- CMake build tool: /usr/bin/make<br>
-- Configuration: RELEASE</h2>
<h2 dir="auto">-- C/C++:<br>
-- Built as dynamic libs?: YES<br>
-- C++ Compiler: /usr/bin/c++ (ver 5.4.0)<br>
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG<br>
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG<br>
-- C Compiler: /usr/bin/cc<br>
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG<br>
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG<br>
-- Linker flags (Release):<br>
-- Linker flags (Debug):<br>
-- Precompiled headers: YES<br>
-- Extra dependencies: /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libtiff.so /usr/lib/x86_64-linux-gnu/libjasper.so /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so gtk-x11-2.0 gdk-x11-2.0 pangocairo-1.0 atk-1.0 cairo gdk_pixbuf-2.0 gio-2.0 pangoft2-1.0 pango-1.0 gobject-2.0 fontconfig freetype gthread-2.0 glib-2.0 dc1394 v4l1 v4l2 avcodec-ffmpeg avformat-ffmpeg avutil-ffmpeg swscale-ffmpeg dl m pthread rt cudart nppc nppi npps cufft<br>
-- 3rdparty dependencies: libwebp ippicv</h2>
<h2 dir="auto">-- OpenCV modules:<br>
-- To be built: hal cudev core cudaarithm flann imgproc ml reg surface_matching video cudabgsegm cudafilters cudaimgproc cudawarping face imgcodecs photo shape videoio cudacodec highgui objdetect optflow tracking ts ximgproc xobjdetect xphoto adas bgsegm bioinspired features2d latentsvm line_descriptor saliency text calib3d ccalib cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo datasets rgbd superres videostab xfeatures2d stitching python2 python3<br>
-- Disabled: world contrib_world<br>
-- Disabled by dependency: -<br>
-- Unavailable: java viz cvv matlab</h2>
<h2 dir="auto">-- GUI:<br>
-- QT: NO<br>
-- GTK+ 2.x: YES (ver 2.24.30)<br>
-- GThread : YES (ver 2.48.2)<br>
-- GtkGlExt: NO<br>
-- OpenGL support: NO<br>
-- VTK support: NO</h2>
<h2 dir="auto">-- Media I/O:<br>
-- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)<br>
-- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )<br>
-- WEBP: build (ver 0.3.1)<br>
-- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.54)<br>
-- TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.0.6)<br>
-- JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)<br>
-- OpenEXR: /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 2.2.0)<br>
-- GDAL: NO</h2>
<h2 dir="auto">-- Video I/O:<br>
-- DC1394 1.x: NO<br>
-- DC1394 2.x: YES (ver 2.2.4)<br>
-- FFMPEG: YES<br>
-- codec: YES (ver 56.60.100)<br>
-- format: YES (ver 56.40.101)<br>
-- util: YES (ver 54.31.100)<br>
-- swscale: YES (ver 3.1.101)<br>
-- resample: NO<br>
-- gentoo-style: YES<br>
-- GStreamer: NO<br>
-- OpenNI: NO<br>
-- OpenNI PrimeSensor Modules: NO<br>
-- OpenNI2: NO<br>
-- PvAPI: NO<br>
-- GigEVisionSDK: NO<br>
-- UniCap: NO<br>
-- UniCap ucil: NO<br>
-- V4L/V4L2: Using libv4l1 (ver 1.10.0) / libv4l2 (ver 1.10.0)<br>
-- XIMEA: NO<br>
-- Xine: NO<br>
-- gPhoto2: NO</h2>
<h2 dir="auto">-- Other third-party libraries:<br>
-- Use IPP: 8.2.1 [8.2.1]<br>
-- at: /home/gamer/opencv/3rdparty/ippicv/unpack/ippicv_lnx<br>
-- Use IPP Async: NO<br>
-- Use Eigen: NO<br>
-- Use TBB: NO<br>
-- Use OpenMP: NO<br>
-- Use GCD NO<br>
-- Use Concurrency NO<br>
-- Use C=: NO<br>
-- Use pthreads for parallel for:<br>
-- YES<br>
-- Use Cuda: YES (ver 7.5)<br>
-- Use OpenCL: YES</h2>
<h2 dir="auto">-- NVIDIA CUDA<br>
-- Use CUFFT: YES<br>
-- Use CUBLAS: NO<br>
-- USE NVCUVID: NO<br>
-- NVIDIA GPU arch: 20 21 30 35<br>
-- NVIDIA PTX archs: 30<br>
-- Use fast math: NO</h2>
<h2 dir="auto">-- OpenCL:<br>
-- Version: dynamic<br>
-- Include path: /home/gamer/opencv/3rdparty/include/opencl/1.2<br>
-- Use AMDFFT: NO<br>
-- Use AMDBLAS: NO</h2>
<h2 dir="auto">-- Python 2:<br>
-- Interpreter: /home/gamer/neon/.venv2/bin/python2.7 (ver 2.7.12)<br>
-- Libraries: /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.12)<br>
-- numpy: /home/gamer/neon/.venv2/local/lib/python2.7/site-packages/numpy/core/include (ver 1.13.1)<br>
-- packages path: lib/python2.7/site-packages</h2>
<h2 dir="auto">-- Python 3:<br>
-- Interpreter: /usr/bin/python3 (ver 3.5.2)<br>
-- Libraries: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (ver 3.5.2)<br>
-- numpy: /home/gamer/.local/lib/python3.5/site-packages/numpy/core/include (ver 1.13.0)<br>
-- packages path: lib/python3.5/site-packages</h2>
<h2 dir="auto">-- Python (for build): /home/gamer/neon/.venv2/bin/python2.7</h2>
<h2 dir="auto">-- Java:<br>
-- ant: NO<br>
-- JNI: /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include<br>
-- Java wrappers: NO<br>
-- Java tests: NO</h2>
<h2 dir="auto">-- Matlab:<br>
-- mex: NO</h2>
<h2 dir="auto">-- Documentation:<br>
-- Doxygen: NO<br>
-- PlantUML: NO</h2>
<h2 dir="auto">-- Tests and samples:<br>
-- Tests: YES<br>
-- Performance tests: YES<br>
-- C/C++ Examples: YES</h2>
<h2 dir="auto">-- Install path: /usr/local</h2>
<p dir="auto">-- cvconfig.h is in: /home/gamer/opencv/build</p> | <h3 dir="auto">Please state the information for your system</h3>
<ul dir="auto">
<li>OpenCV version: 3.0/3.1/master</li>
<li>Host OS: Linux (Ubuntu 16.04)</li>
<li>Compiler: GCC 4.7/4.8/4.9/5.0</li>
<li>CUDA 7.5 (from synaptic package manager ("nvidia-cuda-toolkit"))</li>
</ul>
<h3 dir="auto">In which part of the OpenCV library you got the issue?</h3>
<ul dir="auto">
<li>cuda</li>
</ul>
<p dir="auto">When trying to compile opencv (ubuntu 16.04) i get the following error:</p>
<p dir="auto">[ 9%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o<br>
/usr/include/string.h: In function ‘void* <em><em>mempcpy_inline(void</em>, const void</em>, size_t)’:<br>
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope<br>
return (char *) memcpy (__dest, __src, __n) + __n;<br>
^<br>
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:264 (message):<br>
Error generating file<br>
/home/mag/opencv/build_opencv_master/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o</p>
<p dir="auto">The problem is known, but you need to make a workaround to support cuda. Here is a link to the same Proplem in the caffe git, but unfortunetly the solution doesnt work for me:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="151135972" data-permission-text="Title is private" data-url="https://github.com/BVLC/caffe/issues/4046" data-hovercard-type="issue" data-hovercard-url="/BVLC/caffe/issues/4046/hovercard" href="https://github.com/BVLC/caffe/issues/4046">BVLC/caffe#4046</a></p> | 1 |
<p dir="auto">Is <a href="https://github.com/golang/go/blob/master/doc/go_spec.html#L2398">this</a> an inside joke? It made me twitch when I read it.</p> | <pre class="notranslate">The language specification has a code example which says 9 is prime:
// list of prime numbers
primes := []int{2, 3, 5, 7, 9, 11, 13, 17, 19, 991}
I'd just fix it, but I have to request approval from work first.</pre> | 1 |
<p dir="auto"><strong>Steps to reproduce and a minimal demo of the problem</strong></p>
<ul dir="auto">
<li>Create sibling components in the "component tree" (have a parent component that has multiple components within its template) and give each one of them at least one CSS class in the <code class="notranslate">styles</code> or <code class="notranslate">styleUrls</code> component metadata property.</li>
<li>Set one of those sibling components <code class="notranslate">encapsulation</code> component metadata property to <code class="notranslate">ViewEncapsulation.Native</code></li>
<li>Make sure the other sibling components are not set to <code class="notranslate">ViewEncapsulation.Native</code> mode.</li>
<li>Run the code in <strong>Chrome</strong> since it has Shadow DOM support.</li>
<li>Inspect the DOM in the browser, expand the #shadow-root for the component that is set to <code class="notranslate">ViewEncapsulation.Native</code> mode.</li>
<li>Notice that the <em>styles</em> from the other sibling components are ending up inside of the shadow dom for the component that is set to <code class="notranslate">ViewEncapsulation.Native</code>:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1243236/14227993/2595ca40-f8be-11e5-874a-f1519de4f726.png"><img src="https://cloud.githubusercontent.com/assets/1243236/14227993/2595ca40-f8be-11e5-874a-f1519de4f726.png" alt="image" style="max-width: 100%;"></a></li>
<li>Also notice that the <em>styles</em> from the other sibling components are still ending up in the <code class="notranslate">head</code> tag as expected:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1243236/14228026/e02d8348-f8be-11e5-8f41-798fe3fedf47.png"><img src="https://cloud.githubusercontent.com/assets/1243236/14228026/e02d8348-f8be-11e5-8f41-798fe3fedf47.png" alt="image" style="max-width: 100%;"></a></li>
</ul>
<p dir="auto">Here is an <a href="http://plnkr.co/edit/CbARDYM1kL3duyo4JZpz?p=preview" rel="nofollow">example on Plunker</a></p>
<p dir="auto"><strong>Current behavior</strong><br>
Looks like the CSS shim that is getting created into a <code class="notranslate"><style></code> tag is getting inserted into sibling components in the component tree that are in <code class="notranslate">ViewEncapsulation.Native</code> mode. It also looks like they are put in there in the same order that the custom elements are found within the parent component template markup. So if two non-native mode sibling components are processed in the DOM tree before the native mode one, their <code class="notranslate"><style></code> tags will come before the native one and the native one's markup in the shadow DOM:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1243236/14228051/7a0a9690-f8bf-11e5-84b5-9c2982c75981.png"><img src="https://cloud.githubusercontent.com/assets/1243236/14228051/7a0a9690-f8bf-11e5-84b5-9c2982c75981.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected/desired behavior</strong><br>
I believe that this is not the desired behavior and that those other sibling component styles should not be ending up in the Shadow DOM of the native mode component.</p> | <p dir="auto">When there are sibling components, one with ViewEncapsulation.Native and the other with ViewEncapsulation.None, the styles that any component stylings are being appended to the shadow root of the one component set to Native.</p>
<p dir="auto"><del>Plunker: <a href="http://plnkr.co/edit/huN8xe0S7xH5CUw4B2P6?p=preview" rel="nofollow">http://plnkr.co/edit/huN8xe0S7xH5CUw4B2P6?p=preview</a></del><br>
<strong>Updated Stackblitz</strong>: <a href="https://stackblitz.com/edit/angular-issue-5059?file=src/app/app.component.html" rel="nofollow">https://stackblitz.com/edit/angular-issue-5059?file=src/app/app.component.html</a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/79500/10874083/afa88d42-80e3-11e5-8f8e-ad09cd8414df.png"><img width="491" alt="screen shot 2015-11-01 at 9 58 03 pm" src="https://cloud.githubusercontent.com/assets/79500/10874083/afa88d42-80e3-11e5-8f8e-ad09cd8414df.png" style="max-width: 100%;"></a></p>
<p dir="auto">A component set to Native should not adopt the rest of the CSS rules from non-Native components. In the screenshot of the rendered DOM, the last three style elements are appended to the end of the shadow root, but they are actually declared in the other two components which are set to None and Emulated modes.</p>
<p dir="auto">If all three components are set to Native, then the rules are applied only to the local component, but when they are mixed the rules bleed over into Native (but don't bleed out of Native).</p> | 1 |
<blockquote>
<p dir="auto">[email protected] postinstall G:\nodejs\electron app\sqljs\node_modules\electron<br>
node install.js</p>
</blockquote>
<p dir="auto">Downloading electron-v1.6.10-win32-x64.zip<br>
Error: read ECONNRESET<br>
G:\nodejs\electron app\sqljs\node_modules\electron\install.js:47<br>
throw err<br>
^</p>
<p dir="auto">Error: read ECONNRESET<br>
at exports._errnoException (util.js:1018:11)<br>
at TLSWrap.onread (net.js:568:26)<br>
npm verb lifecycle [email protected]<del>postinstall: unsafe-perm in lifecycle true<br>
npm verb lifecycle [email protected]</del>postinstall: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;G:\nodejs\electron app\sqljs\node_modules\electron\node_modules.bin;G:\nodejs\electron app\sqljs\node_modules.bin;C:\Users\bear\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db\cmd;C:\Users\bear\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db\usr\bin;C:\Users\bear\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db\usr\share\git-tfs;C:\Users\bear\AppData\Local\Apps\2.0\LQWXNEMJ.2HO\4X297WEN.TB2\gith..tion_317444273a93ac29_0003.0003_5794af8169eeff14;C:\Users\bear\AppData\Local\GitHub\lfs-amd64_1.5.5;c:\Software\octave3.6.4\bin;C:\Program Files (x86)\Qucs\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Lenovo\Bluetooth Software;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\Program Files\Broadcom\WHL;C:\Program Files\Broadcom\WHL\syswow64;C:\Program Files\Broadcom\WHL\SysWow64;C:\Program Files\Broadcom\WHL\SysWow64\syswow64;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn;C:\Program Files\Internet Explorer;C:\Program Files (x86)\Common Files\GTK\2.0\bin;C:\Program Files (x86)\Java\jdk1.8.0_111\bin;G:\AndroidSDK\tools\templates\gradle\wrapper;C:\ant\bin;C:\android-sdk-win\tools;C:\android-sdk-win\platform-tools;C:\Program Files (x86)\mingw32\bin;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;G:\AndroidSDK\tools;G:\AndroidSDK\platform-tools;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Brackets\command;C:\Program Files\nodejs;C:\Users\bear\AppData\Local\Microsoft\WindowsApps;G:\web\xampp\php;C:\Users\bear\AppData\Roaming\npm;C:\Program Files (x86)\MSBuild\14.0\bin<br>
npm verb lifecycle [email protected]<del>postinstall: CWD: G:\nodejs\electron app\sqljs\node_modules\electron<br>
npm info lifecycle [email protected]</del>postinstall: Failed to exec postinstall script<br>
npm verb unlock done using C:\Users\bear\AppData\Roaming\npm-cache_locks\staging-0c641607ed835d70.lock for G:\nodejs\electron app\sqljs\node_modules.staging<br>
npm WARN [email protected] No repository field.<br>
npm verb<br>
npm verb If you need help, you may report this error at:<br>
npm verb <a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a><br>
npm verb stack Error: [email protected] postinstall: <code class="notranslate">node install.js</code><br>
npm verb stack Exit status 1<br>
npm verb stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)<br>
npm verb stack at emitTwo (events.js:106:13)<br>
npm verb stack at EventEmitter.emit (events.js:191:7)<br>
npm verb stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)<br>
npm verb stack at emitTwo (events.js:106:13)<br>
npm verb stack at ChildProcess.emit (events.js:191:7)<br>
npm verb stack at maybeClose (internal/child_process.js:886:16)<br>
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)<br>
npm verb pkgid [email protected]<br>
npm verb cwd G:\nodejs\electron app\sqljs<br>
npm ERR! Windows_NT 10.0.14393<br>
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--save-dev" "electron" "--verbose"<br>
npm ERR! node v6.10.3<br>
npm ERR! npm v3.10.10<br>
npm ERR! code ELIFECYCLE</p>
<p dir="auto">npm ERR! [email protected] postinstall: <code class="notranslate">node install.js</code><br>
npm ERR! Exit status 1<br>
npm ERR!<br>
npm ERR! Failed at the [email protected] postinstall script 'node install.js'.<br>
npm ERR! Make sure you have the latest version of node.js and npm installed.<br>
npm ERR! If you do, this is most likely a problem with the electron package,<br>
npm ERR! not with npm itself.<br>
npm ERR! Tell the author that this fails on your system:<br>
npm ERR! node install.js<br>
npm ERR! You can get information on how to open an issue for this project with:<br>
npm ERR! npm bugs electron<br>
npm ERR! Or if that isn't available, you can get their info via:<br>
npm ERR! npm owner ls electron<br>
npm ERR! There is likely additional logging output above.<br>
npm verb exit [ 1, true ]</p>
<p dir="auto">npm ERR! Please include the following file with any support request:<br>
npm ERR! G:\nodejs\electron app\sqljs\npm-debug.log</p>
<p dir="auto">G:\nodejs\electron app\sqljs> node --version<br>
v6.10.3</p> | <ul dir="auto">
<li>[email protected]</li>
<li>Windows 10</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Installation with angular 4</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Error on Post Install script</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">ng new project<br>
cd project<br>
npm install --save-dev electron</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="D:\electron\project1\node_modules\electron\install.js:47
throw err
^
Error: read ECONNRESET
at exports._errnoException (util.js:1050:11)
at TLSWrap.onread (net.js:581:26)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any
"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:"><pre class="notranslate"><code class="notranslate">D:\electron\project1\node_modules\electron\install.js:47
throw err
^
Error: read ECONNRESET
at exports._errnoException (util.js:1050:11)
at TLSWrap.onread (net.js:581:26)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any
"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
</code></pre></div>
<p dir="auto">Full debug log <a href="https://gist.github.com/hsrtechs/ca939599fda9db2beaa8e3b04d675364">https://gist.github.com/hsrtechs/ca939599fda9db2beaa8e3b04d675364</a></p> | 1 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18362.388
Windows Terminal version (if applicable): 0.5.2762.0
Powershell version:
PSVersion 5.1.18362.145
PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1 "><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.388
Windows Terminal version (if applicable): 0.5.2762.0
Powershell version:
PSVersion 5.1.18362.145
PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ul dir="auto">
<li>Open Powershell tab</li>
<li>Press Ctrl-Alt-? (Ctrl-Alt-Shift-/)</li>
</ul>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">it should display Powershell existing key binding<br>
Basic editing functions</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="=======================
Enter AcceptLine Accept the input or move to the next line if input is missing a closing token.
Shift+Enter AddLine Move the cursor to the next line without attempting to execute the input
Backspace BackwardDeleteChar Delete the character before the cursor
Ctrl+h BackwardDeleteChar Delete the character before the cursor
Ctrl+Home BackwardDeleteLine Delete text from the cursor to the start of the line
Ctrl+Backspace BackwardKillWord Move the text from the start of the current or previous word to the cursor to th...
Ctrl+C Copy Copy selected region to the system clipboard. If no region is selected, copy th...
Ctrl+c CopyOrCancelLine Either copy selected text to the clipboard, or if no text is selected, cancel ed...
Ctrl+x Cut Delete selected region placing deleted text in the system clipboard"><pre class="notranslate"><code class="notranslate">=======================
Enter AcceptLine Accept the input or move to the next line if input is missing a closing token.
Shift+Enter AddLine Move the cursor to the next line without attempting to execute the input
Backspace BackwardDeleteChar Delete the character before the cursor
Ctrl+h BackwardDeleteChar Delete the character before the cursor
Ctrl+Home BackwardDeleteLine Delete text from the cursor to the start of the line
Ctrl+Backspace BackwardKillWord Move the text from the start of the current or previous word to the cursor to th...
Ctrl+C Copy Copy selected region to the system clipboard. If no region is selected, copy th...
Ctrl+c CopyOrCancelLine Either copy selected text to the clipboard, or if no text is selected, cancel ed...
Ctrl+x Cut Delete selected region placing deleted text in the system clipboard
</code></pre></div>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">it displays weird characters:<br>
<code class="notranslate">^_ </code></p> | <p dir="auto">Windows 10.0.18309 x64</p>
<p dir="auto">There is popular font <a href="https://sourceforge.net/projects/terminus-font/files/" rel="nofollow">Terminus</a>. That font does not recognize by windows console, but <a href="http://files.ax86.net/terminus-ttf/" rel="nofollow">ttf fork</a> works ok. Any others software recognize <a href="https://sourceforge.net/projects/terminus-font/files/" rel="nofollow">this font</a> as monospaced font and supports it. <a href="https://conemu.github.io/" rel="nofollow">ConEmu</a> supports it too.</p>
<p dir="auto">So, maybe it's time to remove this shitty fonts limitations at all and rewrite like in <a href="https://conemu.github.io/" rel="nofollow">ConEmu</a>?</p>
<p dir="auto">Windows console does not support <a href="https://sourceforge.net/projects/terminus-font/files/" rel="nofollow">terminus font</a>:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/26321641/50729166-036a2800-112d-11e9-8ffc-7de9f724801f.png"><img src="https://user-images.githubusercontent.com/26321641/50729166-036a2800-112d-11e9-8ffc-7de9f724801f.png" alt="winconsol" style="max-width: 100%;"></a></p>
<p dir="auto"><a href="https://conemu.github.io/" rel="nofollow">ConEmu</a> supports all fonts, monospaced highlighted.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/26321641/50729163-f4837580-112c-11e9-9d38-bd9b312d948f.png"><img src="https://user-images.githubusercontent.com/26321641/50729163-f4837580-112c-11e9-9d38-bd9b312d948f.png" alt="conemu" style="max-width: 100%;"></a></p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="373225157" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/295" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/295/hovercard" href="https://github.com/microsoft/terminal/issues/295">#295</a></p> | 0 |
<p dir="auto">by <strong>hongruiqi</strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?
http.Handle("/test///a", Handler)
And visit <a href="http://localhost/test/%2f/a" rel="nofollow">http://localhost/test/%2f/a</a>
What is the expected output?
Handler should be called.
What do you see instead?
The browser is redirected to /test/a, and a 404 error
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
linux
Which version are you using? (run 'go version')
go version devel +0d9fd828f099 Wed Jan 30 17:26:22 2013 +1100 linux/amd64.
Please provide any additional information below.
if p := cleanPath(path); p != path {
_, pattern = mux.handler(r.Host, p)
return RedirectHandler(p, StatusMovedPermanently), pattern
}
If path is a raw path before unescape,/test/%2f/a can be handled correctly without
redirect. mux.match can use r.URL.Path as before.</pre> | <pre class="notranslate">Here is a test program
<a href="http://play.golang.org/p/lROOy0Hekp" rel="nofollow">http://play.golang.org/p/lROOy0Hekp</a>
The value 2^120 is exactly represented as a float64. A different, incorrect answer is
returned by 8g (0.4779...). The right answer is returned by gccgo on an 64-bit x86
(-0.9258...). The wrong answer is returned by gccgo on 32-bit x86 where the cos
function doesn't seem to compute anything and behaves like the identity function.</pre> | 0 |
<p dir="auto"><code class="notranslate">GET /{index}/_aliases/{name}</code> is supposed to filter aliases by index and/or by name.</p>
<p dir="auto">But if you want to filter only by alias <code class="notranslate">name</code>, it gives you back all indices:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="curl -XDELETE localhost:9200/foo,bar?pretty
curl -XPUT localhost:9200/foo?pretty
curl -XPUT localhost:9200/bar?pretty
curl -XPOST localhost:9200/_aliases?pretty -d '{
"actions" : [
{ "add" : { "index" : "foo", "alias" : "myalias" } }
]
}'
# Correct
curl -XGET localhost:9200/_aliases?pretty
# {
# "bar" : {
# "aliases" : { }
# },
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }
# Correct
curl -XGET localhost:9200/foo/_aliases?pretty
# {
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }
# Incorrect
curl -XGET localhost:9200/_aliases/myalias?pretty
# {
# "bar" : {
# "aliases" : { }
# },
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }
# Correct
curl -XGET localhost:9200/_alias?pretty
# {
# "bar" : {
# "aliases" : { }
# },
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }
# Correct
curl -XGET localhost:9200/foo/_alias?pretty
# {
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }
# Correct
curl -XGET localhost:9200/_alias/myalias?pretty
# {
# "foo" : {
# "aliases" : {
# "myalias" : { }
# }
# }
# }"><pre class="notranslate">curl -XDELETE localhost:9200/foo,bar<span class="pl-k">?</span>pretty
curl -XPUT localhost:9200/foo<span class="pl-k">?</span>pretty
curl -XPUT localhost:9200/bar<span class="pl-k">?</span>pretty
curl -XPOST localhost:9200/_aliases<span class="pl-k">?</span>pretty -d <span class="pl-s"><span class="pl-pds">'</span>{</span>
<span class="pl-s"> "actions" : [</span>
<span class="pl-s"> { "add" : { "index" : "foo", "alias" : "myalias" } }</span>
<span class="pl-s"> ]</span>
<span class="pl-s">}<span class="pl-pds">'</span></span>
<span class="pl-c"><span class="pl-c">#</span> Correct</span>
curl -XGET localhost:9200/_aliases<span class="pl-k">?</span>pretty
<span class="pl-c"><span class="pl-c">#</span> {</span>
<span class="pl-c"><span class="pl-c">#</span> "bar" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "aliases" : { }</span>
<span class="pl-c"><span class="pl-c">#</span> },</span>
<span class="pl-c"><span class="pl-c">#</span> "foo" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "aliases" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "myalias" : { }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> Correct</span>
curl -XGET localhost:9200/foo/_aliases<span class="pl-k">?</span>pretty
<span class="pl-c"><span class="pl-c">#</span> {</span>
<span class="pl-c"><span class="pl-c">#</span> "foo" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "aliases" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "myalias" : { }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> Incorrect</span>
curl -XGET localhost:9200/_aliases/myalias<span class="pl-k">?</span>pretty
<span class="pl-c"><span class="pl-c">#</span> {</span>
<span class="pl-c"><span class="pl-c">#</span> "bar" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "aliases" : { }</span>
<span class="pl-c"><span class="pl-c">#</span> },</span>
<span class="pl-c"><span class="pl-c">#</span> "foo" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "aliases" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "myalias" : { }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> Correct</span>
curl -XGET localhost:9200/_alias<span class="pl-k">?</span>pretty
<span class="pl-c"><span class="pl-c">#</span> {</span>
<span class="pl-c"><span class="pl-c">#</span> "bar" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "aliases" : { }</span>
<span class="pl-c"><span class="pl-c">#</span> },</span>
<span class="pl-c"><span class="pl-c">#</span> "foo" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "aliases" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "myalias" : { }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> Correct</span>
curl -XGET localhost:9200/foo/_alias<span class="pl-k">?</span>pretty
<span class="pl-c"><span class="pl-c">#</span> {</span>
<span class="pl-c"><span class="pl-c">#</span> "foo" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "aliases" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "myalias" : { }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> Correct</span>
curl -XGET localhost:9200/_alias/myalias<span class="pl-k">?</span>pretty
<span class="pl-c"><span class="pl-c">#</span> {</span>
<span class="pl-c"><span class="pl-c">#</span> "foo" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "aliases" : {</span>
<span class="pl-c"><span class="pl-c">#</span> "myalias" : { }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span>
<span class="pl-c"><span class="pl-c">#</span> }</span></pre></div>
<p dir="auto">We don't document <code class="notranslate">GET _aliases</code> anymore so may be we should remove its support as we can do the same thing with <code class="notranslate">GET _alias</code> API.</p>
<p dir="auto">Might be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="25672241" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/4743" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/4743/hovercard" href="https://github.com/elastic/elasticsearch/issues/4743">#4743</a><br>
Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="125363831" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch-js/issues/331" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch-js/issues/331/hovercard" href="https://github.com/elastic/elasticsearch-js/issues/331">elastic/elasticsearch-js#331</a></p> | <p dir="auto">While working on removing <code class="notranslate">ImmutableMap</code> and <code class="notranslate">ImmutableSet</code> I've seen a ton of different fun ways to read immutable maps, sets, and lists. If we're willing to use Java 8's function pointer things we could remove lots of duplicated code by creating <code class="notranslate">readMap</code>, <code class="notranslate">readSet</code>, and <code class="notranslate">readList</code> in <code class="notranslate">StreamInput</code>. We could probably also do something similar for writing these but I haven't thought as much about it.</p> | 0 |
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [2]: keys = ['c', 'a', 'b', 'c']
In [3]: tm = pd.DataFrame(index=pd.MultiIndex.from_tuples([('b', 1), ('b', 2), ('a', 1), ('c', 1)]),
...: columns=range(3))
In [4]: tm.loc[keys] # bad
Out[4]:
0 1 2
b 1 NaN NaN NaN
2 NaN NaN NaN
a 1 NaN NaN NaN
c 1 NaN NaN NaN
In [5]: tm.transpose().loc[:, keys].transpose() # bad
Out[5]:
0 1 2
b 1 NaN NaN NaN
2 NaN NaN NaN
a 1 NaN NaN NaN
c 1 NaN NaN NaN
In [6]: tm.loc[[(k, 1) for k in keys]] # complete indexing: good
Out[6]:
0 1 2
c 1 NaN NaN NaN
a 1 NaN NaN NaN
b 1 NaN NaN NaN
c 1 NaN NaN NaN
In [7]: tf = pd.DataFrame(index=['b', 'a', 'c'],
...: columns=range(3))
In [8]: tf.loc[keys] # flat index: good
Out[8]:
0 1 2
c NaN NaN NaN
a NaN NaN NaN
b NaN NaN NaN
c NaN NaN NaN"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">keys</span> <span class="pl-c1">=</span> [<span class="pl-s">'c'</span>, <span class="pl-s">'a'</span>, <span class="pl-s">'b'</span>, <span class="pl-s">'c'</span>]
<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">tm</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">MultiIndex</span>.<span class="pl-en">from_tuples</span>([(<span class="pl-s">'b'</span>, <span class="pl-c1">1</span>), (<span class="pl-s">'b'</span>, <span class="pl-c1">2</span>), (<span class="pl-s">'a'</span>, <span class="pl-c1">1</span>), (<span class="pl-s">'c'</span>, <span class="pl-c1">1</span>)]),
...: <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">3</span>))
<span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">tm</span>.<span class="pl-s1">loc</span>[<span class="pl-s1">keys</span>] <span class="pl-c"># bad</span>
<span class="pl-v">Out</span>[<span class="pl-c1">4</span>]:
<span class="pl-c1">0</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span>
<span class="pl-s1">b</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">2</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">a</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">c</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">tm</span>.<span class="pl-en">transpose</span>().<span class="pl-s1">loc</span>[:, <span class="pl-s1">keys</span>].<span class="pl-en">transpose</span>() <span class="pl-c"># bad</span>
<span class="pl-v">Out</span>[<span class="pl-c1">5</span>]:
<span class="pl-c1">0</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span>
<span class="pl-s1">b</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">2</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">a</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">c</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-v">In</span> [<span class="pl-c1">6</span>]: <span class="pl-s1">tm</span>.<span class="pl-s1">loc</span>[[(<span class="pl-s1">k</span>, <span class="pl-c1">1</span>) <span class="pl-k">for</span> <span class="pl-s1">k</span> <span class="pl-c1">in</span> <span class="pl-s1">keys</span>]] <span class="pl-c"># complete indexing: good</span>
<span class="pl-v">Out</span>[<span class="pl-c1">6</span>]:
<span class="pl-c1">0</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span>
<span class="pl-s1">c</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">a</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">b</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">c</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-v">In</span> [<span class="pl-c1">7</span>]: <span class="pl-s1">tf</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-s">'b'</span>, <span class="pl-s">'a'</span>, <span class="pl-s">'c'</span>],
...: <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-en">range</span>(<span class="pl-c1">3</span>))
<span class="pl-v">In</span> [<span class="pl-c1">8</span>]: <span class="pl-s1">tf</span>.<span class="pl-s1">loc</span>[<span class="pl-s1">keys</span>] <span class="pl-c"># flat index: good</span>
<span class="pl-v">Out</span>[<span class="pl-c1">8</span>]:
<span class="pl-c1">0</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span>
<span class="pl-s1">c</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">a</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">b</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">c</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">Partial indexing of a <code class="notranslate">MultiIndex</code> with a list discards order/repetitions.</p>
<h4 dir="auto">Expected Output</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [9]: pd.concat([tm.loc[[k]] for k in keys])
Out[9]:
0 1 2
c 1 NaN NaN NaN
a 1 NaN NaN NaN
b 1 NaN NaN NaN
2 NaN NaN NaN
c 1 NaN NaN NaN"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">9</span>]: <span class="pl-s1">pd</span>.<span class="pl-en">concat</span>([<span class="pl-s1">tm</span>.<span class="pl-s1">loc</span>[[<span class="pl-s1">k</span>]] <span class="pl-k">for</span> <span class="pl-s1">k</span> <span class="pl-c1">in</span> <span class="pl-s1">keys</span>])
<span class="pl-v">Out</span>[<span class="pl-c1">9</span>]:
<span class="pl-c1">0</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span>
<span class="pl-s1">c</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">a</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">b</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-c1">2</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span>
<span class="pl-s1">c</span> <span class="pl-c1">1</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span></pre></div>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.5.3.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 4.9.0-3-amd64<br>
machine: x86_64<br>
processor:<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: it_IT.UTF-8<br>
LOCALE: it_IT.UTF-8</p>
<p dir="auto">pandas: 0.22.0.dev0+135.g9c799e2c4<br>
pytest: 3.2.3<br>
pip: 9.0.1<br>
setuptools: 36.7.0<br>
Cython: 0.25.2<br>
numpy: 1.12.1<br>
scipy: 0.19.0<br>
pyarrow: None<br>
xarray: None<br>
IPython: 6.2.1<br>
sphinx: 1.5.6<br>
patsy: 0.4.1<br>
dateutil: 2.6.1<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: 1.2.0dev<br>
tables: 3.3.0<br>
numexpr: 2.6.1<br>
feather: 0.3.1<br>
matplotlib: 2.0.0<br>
openpyxl: None<br>
xlrd: 1.0.0<br>
xlwt: 1.1.2<br>
xlsxwriter: 0.9.6<br>
lxml: None<br>
bs4: 4.5.3<br>
html5lib: 0.999999999<br>
sqlalchemy: 1.0.15<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.10<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: 0.2.1</p>
</details> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [40]: cols = pd.MultiIndex.from_product([['A', 'B', 'C'],[1,2]])
In [41]: df = pd.DataFrame(np.random.randn(5,6), columns=cols)
In [42]: df.loc[:, ['B', 'A']]
Out[42]:
A B
1 2 1 2
0 -0.990868 1.577803 1.023247 -0.423165
1 -1.180170 1.236143 -1.484085 0.044929
2 1.665502 -0.711081 0.227827 0.651859
3 -0.659154 0.154327 -1.548650 -0.070550
4 -0.232819 0.100959 -0.102296 0.260816"><pre class="notranslate"><code class="notranslate">In [40]: cols = pd.MultiIndex.from_product([['A', 'B', 'C'],[1,2]])
In [41]: df = pd.DataFrame(np.random.randn(5,6), columns=cols)
In [42]: df.loc[:, ['B', 'A']]
Out[42]:
A B
1 2 1 2
0 -0.990868 1.577803 1.023247 -0.423165
1 -1.180170 1.236143 -1.484085 0.044929
2 1.665502 -0.711081 0.227827 0.651859
3 -0.659154 0.154327 -1.548650 -0.070550
4 -0.232819 0.100959 -0.102296 0.260816
</code></pre></div> | 1 |
<p dir="auto">The function divides by the entire number of elements and not just batch sample size.<br>
For example, using</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="loss_f1 = nn.MSELoss()
loss_f2 = nn.MSELoss(size_average=False)
x = autograd.Variable(torch.FloatTensor([ [1,2,3], [1,2,3] ]))
y = autograd.Variable(torch.FloatTensor([ [2,4,6], [3,4,7] ]))
# sample size of current batch = 2
# dimension of features = 3"><pre class="notranslate"><code class="notranslate">loss_f1 = nn.MSELoss()
loss_f2 = nn.MSELoss(size_average=False)
x = autograd.Variable(torch.FloatTensor([ [1,2,3], [1,2,3] ]))
y = autograd.Variable(torch.FloatTensor([ [2,4,6], [3,4,7] ]))
# sample size of current batch = 2
# dimension of features = 3
</code></pre></div>
<p dir="auto">shows the problem.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
# loss no averaging/no division...just plain summing up
loss_2 = loss_f2(x, y) # = 38
# averaged loss over batch sample size
loss_1 = loss_f1(x, y) # = 6.3333
# Apparently division by 6 was done in the second averaging case."><pre class="notranslate"><code class="notranslate">
# loss no averaging/no division...just plain summing up
loss_2 = loss_f2(x, y) # = 38
# averaged loss over batch sample size
loss_1 = loss_f1(x, y) # = 6.3333
# Apparently division by 6 was done in the second averaging case.
</code></pre></div>
<p dir="auto">The documentation describes the implemented MSE loss as</p>
<blockquote>
<p dir="auto">loss(x,y)=1/n (sum(||x-y||**2)</p>
</blockquote>
<p dir="auto">where n is the sample size of the current batch.<br>
However, apparently the expression does not get divided by n (which would be 2 in our example), but by 2*3=6, i.e. the entire number of elements per training batch.</p>
<p dir="auto">Is this intended? From a theoretical standpoint it should be 2, shouldn't it?</p> | <p dir="auto">Setting <code class="notranslate">size_average=False</code> behaves differently for <code class="notranslate">mse_loss</code> than for <code class="notranslate">cross_entropy</code>. For <code class="notranslate">cross_entropy</code>, it multiplies the result by the batch size. For <code class="notranslate">mse_loss</code> it multiplies the result by the overall size of the matrix.</p>
<p dir="auto">I believe the <code class="notranslate">cross_entropy</code> behavior is correct and <code class="notranslate">mse_loss</code> should be changed to behave similarly. Alternatively, the documentation should be changed to clarify the difference.</p>
<p dir="auto">Actually, <code class="notranslate">mse_loss</code> behaves similarly to <code class="notranslate">kl_div</code>, but at least the behavior is documented in <code class="notranslate">kl_div</code>. (But before reading the documentation, I expected also <code class="notranslate">kl_div</code> to behave similarly to <code class="notranslate">cross_entropy</code>.) I haven't checked how other loss functions behave.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import torch.version
from torch.nn import functional as F
from torch import FloatTensor
from torch.autograd import Variable
def v(array):
return Variable(FloatTensor(array))
def kl(logit, target, size_average=True):
return F.kl_div(F.log_softmax(logit), target, size_average=size_average)
def xe(logit, target, size_average=True):
return F.cross_entropy(logit, target.max(1)[1], size_average=size_average)
def mse(logit, target, size_average=True):
return F.mse_loss(F.softmax(logit), target, size_average=size_average)
target = v(np.eye(5)[:3])
logit = v(np.zeros((3, 5)))
print("Torch version:", torch.__version__)
print()
print("How each loss function scales the result with size_average:")
for loss in [kl, mse, xe]:
with_size_average = loss(logit, target, size_average=True)
without_size_average = loss(logit, target, size_average=False)
factor = (without_size_average / with_size_average).data[0]
print("- {loss.__name__}: {factor}".format(**locals()))```"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">torch</span>.<span class="pl-s1">version</span>
<span class="pl-k">from</span> <span class="pl-s1">torch</span>.<span class="pl-s1">nn</span> <span class="pl-k">import</span> <span class="pl-s1">functional</span> <span class="pl-k">as</span> <span class="pl-v">F</span>
<span class="pl-k">from</span> <span class="pl-s1">torch</span> <span class="pl-k">import</span> <span class="pl-v">FloatTensor</span>
<span class="pl-k">from</span> <span class="pl-s1">torch</span>.<span class="pl-s1">autograd</span> <span class="pl-k">import</span> <span class="pl-v">Variable</span>
<span class="pl-k">def</span> <span class="pl-en">v</span>(<span class="pl-s1">array</span>):
<span class="pl-k">return</span> <span class="pl-v">Variable</span>(<span class="pl-v">FloatTensor</span>(<span class="pl-s1">array</span>))
<span class="pl-k">def</span> <span class="pl-en">kl</span>(<span class="pl-s1">logit</span>, <span class="pl-s1">target</span>, <span class="pl-s1">size_average</span><span class="pl-c1">=</span><span class="pl-c1">True</span>):
<span class="pl-k">return</span> <span class="pl-v">F</span>.<span class="pl-en">kl_div</span>(<span class="pl-v">F</span>.<span class="pl-en">log_softmax</span>(<span class="pl-s1">logit</span>), <span class="pl-s1">target</span>, <span class="pl-s1">size_average</span><span class="pl-c1">=</span><span class="pl-s1">size_average</span>)
<span class="pl-k">def</span> <span class="pl-en">xe</span>(<span class="pl-s1">logit</span>, <span class="pl-s1">target</span>, <span class="pl-s1">size_average</span><span class="pl-c1">=</span><span class="pl-c1">True</span>):
<span class="pl-k">return</span> <span class="pl-v">F</span>.<span class="pl-en">cross_entropy</span>(<span class="pl-s1">logit</span>, <span class="pl-s1">target</span>.<span class="pl-en">max</span>(<span class="pl-c1">1</span>)[<span class="pl-c1">1</span>], <span class="pl-s1">size_average</span><span class="pl-c1">=</span><span class="pl-s1">size_average</span>)
<span class="pl-k">def</span> <span class="pl-en">mse</span>(<span class="pl-s1">logit</span>, <span class="pl-s1">target</span>, <span class="pl-s1">size_average</span><span class="pl-c1">=</span><span class="pl-c1">True</span>):
<span class="pl-k">return</span> <span class="pl-v">F</span>.<span class="pl-en">mse_loss</span>(<span class="pl-v">F</span>.<span class="pl-en">softmax</span>(<span class="pl-s1">logit</span>), <span class="pl-s1">target</span>, <span class="pl-s1">size_average</span><span class="pl-c1">=</span><span class="pl-s1">size_average</span>)
<span class="pl-s1">target</span> <span class="pl-c1">=</span> <span class="pl-en">v</span>(<span class="pl-s1">np</span>.<span class="pl-en">eye</span>(<span class="pl-c1">5</span>)[:<span class="pl-c1">3</span>])
<span class="pl-s1">logit</span> <span class="pl-c1">=</span> <span class="pl-en">v</span>(<span class="pl-s1">np</span>.<span class="pl-en">zeros</span>((<span class="pl-c1">3</span>, <span class="pl-c1">5</span>)))
<span class="pl-en">print</span>(<span class="pl-s">"Torch version:"</span>, <span class="pl-s1">torch</span>.<span class="pl-s1">__version__</span>)
<span class="pl-en">print</span>()
<span class="pl-en">print</span>(<span class="pl-s">"How each loss function scales the result with size_average:"</span>)
<span class="pl-k">for</span> <span class="pl-s1">loss</span> <span class="pl-c1">in</span> [<span class="pl-s1">kl</span>, <span class="pl-s1">mse</span>, <span class="pl-s1">xe</span>]:
<span class="pl-s1">with_size_average</span> <span class="pl-c1">=</span> <span class="pl-en">loss</span>(<span class="pl-s1">logit</span>, <span class="pl-s1">target</span>, <span class="pl-s1">size_average</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">without_size_average</span> <span class="pl-c1">=</span> <span class="pl-en">loss</span>(<span class="pl-s1">logit</span>, <span class="pl-s1">target</span>, <span class="pl-s1">size_average</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)
<span class="pl-s1">factor</span> <span class="pl-c1">=</span> (<span class="pl-s1">without_size_average</span> <span class="pl-c1">/</span> <span class="pl-s1">with_size_average</span>).<span class="pl-s1">data</span>[<span class="pl-c1">0</span>]
<span class="pl-en">print</span>(<span class="pl-s">"- {loss.__name__}: {factor}"</span>.<span class="pl-en">format</span>(<span class="pl-c1">**</span><span class="pl-en">locals</span>()))<span class="pl-s">``</span>`</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Torch version: 0.2.0+40ca356
How each loss function scales the result with size_average:
- kl: 15.0
- mse: 15.0
- xe: 3.0"><pre class="notranslate"><code class="notranslate">Torch version: 0.2.0+40ca356
How each loss function scales the result with size_average:
- kl: 15.0
- mse: 15.0
- xe: 3.0
</code></pre></div> | 1 |
<p dir="auto">hi</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import cv2
cap=cv2.VideoCapture("set/your/file/here")
w = cap.get(cv2.CAP_PROP_FRAME_WIDTH)
cnt = cap.get(cv2.CAP_PROP_FRAME_COUNT)
print("Opencv width %d frames %d"%(w,cnt))
cap.read()
ts= cap.get(cv2.CAP_PROP_POS_MSEC)
print("ts @ frame 0 after read %.3f"%ts)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">cv2</span>
<span class="pl-s1">cap</span><span class="pl-c1">=</span><span class="pl-s1">cv2</span>.<span class="pl-v">VideoCapture</span>(<span class="pl-s">"set/your/file/here"</span>)
<span class="pl-s1">w</span> <span class="pl-c1">=</span> <span class="pl-s1">cap</span>.<span class="pl-en">get</span>(<span class="pl-s1">cv2</span>.<span class="pl-v">CAP_PROP_FRAME_WIDTH</span>)
<span class="pl-s1">cnt</span> <span class="pl-c1">=</span> <span class="pl-s1">cap</span>.<span class="pl-en">get</span>(<span class="pl-s1">cv2</span>.<span class="pl-v">CAP_PROP_FRAME_COUNT</span>)
<span class="pl-en">print</span>(<span class="pl-s">"Opencv width %d frames %d"</span><span class="pl-c1">%</span>(<span class="pl-s1">w</span>,<span class="pl-s1">cnt</span>))
<span class="pl-s1">cap</span>.<span class="pl-en">read</span>()
<span class="pl-s1">ts</span><span class="pl-c1">=</span> <span class="pl-s1">cap</span>.<span class="pl-en">get</span>(<span class="pl-s1">cv2</span>.<span class="pl-v">CAP_PROP_POS_MSEC</span>)
<span class="pl-en">print</span>(<span class="pl-s">"ts @ frame 0 after read %.3f"</span><span class="pl-c1">%</span><span class="pl-s1">ts</span>)</pre></div>
<p dir="auto">i have run this on my PC and got different results in different versions:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="after 4.1.2:
ts @ frame 0 after read 0.000
before 4.1.1:
ts @ frame 0 after read 40.000"><pre lang="text" class="notranslate"><code class="notranslate">after 4.1.2:
ts @ frame 0 after read 0.000
before 4.1.1:
ts @ frame 0 after read 40.000
</code></pre></div>
<p dir="auto">so i am a little confused.</p>
<ul dir="auto">
<li>which one is (will be) correct in the future?</li>
<li>what is the actual meaning of these timestamps? (start time ? end time ? )</li>
</ul>
<p dir="auto">thanks</p> | <h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 3.4.1</li>
<li>Operating System / Platform => windows 64</li>
<li>Compiler => visual studio 2017</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Trained a model on tensorflow for 2 classes.<br>
I'm using the sample Opencv dnn code to call my .pb file, and it predicts only one single class. Specifically the second class (second line) from labels text file.</p>
<p dir="auto">My C++ code for inference: (note - for input blob I factored to scale 1/127, swapped channels and also did mean subtraction but to no luck)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
// Copyright (C) 2016, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
/*
Sample of using OpenCV dnn module with Tensorflow Inception model.
*/
#include <stdafx.h>
using namespace cv;
using namespace cv::dnn;
#include <fstream>
#include <iostream>
#include <cstdlib>
using namespace std;
const String keys =
"{help h || Sample app for loading Inception TensorFlow model. "
"The model and class names list can be downloaded here: "
"https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip }"
"{model m |tensorflow_inception_graph.pb| path to TensorFlow .pb model file }"
"{image i || path to image file }"
"{i_blob | input | input blob name) }"
"{o_blob | softmax2 | output blob name) }"
"{c_names c | imagenet_comp_graph_label_strings.txt | path to file with classnames for class id }"
"{result r || path to save output blob (optional, binary format, NCHW order) }"
;
void getMaxClass(const Mat &probBlob, int *classId, double *classProb);
std::vector<String> readClassNames(const char *filename);
int main(int argc, char **argv)
{
cv::CommandLineParser parser(argc, argv, keys);
if (parser.has("help"))
{
parser.printMessage();
return 0;
}
String modelFile = "OptimizedGraph.pb";
String imageFile = "img.JPG";
String inBlobName = "input";
String outBlobName = "side";
if (!parser.check())
{
parser.printErrors();
return 0;
}
String classNamesFile = "imagenet_comp_graph_label_strings.txt";
String resultFile = "output.txt";
//! [Initialize network]
dnn::Net net = readNetFromTensorflow(modelFile);
//! [Initialize network]
if (net.empty())
{
std::cerr << "Can't load network by using the mode file: " << std::endl;
std::cerr << modelFile << std::endl;
exit(-1);
}
//! [Prepare blob]
Mat img = imread(imageFile);
if (img.empty())
{
std::cerr << "Can't read image from the file: " << imageFile << std::endl;
exit(-1);
}
Mat inputBlob = blobFromImage(img, 0.00784, Size(160, 160),Scalar(127.5,127.5,127.5), true, false); //Convert Mat to batch of images
//! [Prepare blob]
inputBlob -= 117.0;
//! [Set input blob]
net.setInput(inputBlob, inBlobName); //set the network input
//! [Set input blob]
cv::TickMeter tm;
tm.start();
//! [Make forward pass]
Mat result = net.forward(outBlobName); //compute output
//! [Make forward pass]
tm.stop();
if (!resultFile.empty()) {
CV_Assert(result.isContinuous());
ofstream fout(resultFile.c_str(), ios::out | ios::binary);
fout.write((char*)result.data, result.total() * sizeof(float));
fout.close();
}
std::cout << "Output blob shape " << result.size[0] << " x " << result.size[1] << " x " << result.size[2] << " x " << result.size[3] << std::endl;
std::cout << "Inference time, ms: " << tm.getTimeMilli() << std::endl;
if (!classNamesFile.empty()) {
std::vector<String> classNames = readClassNames(classNamesFile.c_str());
int classId;
double classProb;
getMaxClass(result, &classId, &classProb);//find the best class
//! [Print results]
std::cout << "Best class: #" << classId << " '" << classNames.at(classId) << "'" << std::endl;
std::cout << "Probability: " << classProb * 100 << "%" << std::endl;
}
return 0;
} //main
/* Find best class for the blob (i. e. class with maximal probability) */
void getMaxClass(const Mat &probBlob, int *classId, double *classProb)
{
Mat probMat = probBlob.reshape(1, 1); //reshape the blob to 1x1000 matrix
Point classNumber;
minMaxLoc(probMat, NULL, classProb, NULL, &classNumber);
*classId = classNumber.x;
}
std::vector<String> readClassNames(const char *filename)
{
std::vector<String> classNames;
std::ifstream fp(filename);
if (!fp.is_open())
{
std::cerr << "File with classes labels not found: " << filename << std::endl;
exit(-1);
}
std::string name;
while (!fp.eof())
{
std::getline(fp, name);
if (name.length())
classNames.push_back(name);
}
fp.close();
return classNames;
}"><pre lang="//" class="notranslate"><code class="notranslate">// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
// Copyright (C) 2016, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
/*
Sample of using OpenCV dnn module with Tensorflow Inception model.
*/
#include <stdafx.h>
using namespace cv;
using namespace cv::dnn;
#include <fstream>
#include <iostream>
#include <cstdlib>
using namespace std;
const String keys =
"{help h || Sample app for loading Inception TensorFlow model. "
"The model and class names list can be downloaded here: "
"https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip }"
"{model m |tensorflow_inception_graph.pb| path to TensorFlow .pb model file }"
"{image i || path to image file }"
"{i_blob | input | input blob name) }"
"{o_blob | softmax2 | output blob name) }"
"{c_names c | imagenet_comp_graph_label_strings.txt | path to file with classnames for class id }"
"{result r || path to save output blob (optional, binary format, NCHW order) }"
;
void getMaxClass(const Mat &probBlob, int *classId, double *classProb);
std::vector<String> readClassNames(const char *filename);
int main(int argc, char **argv)
{
cv::CommandLineParser parser(argc, argv, keys);
if (parser.has("help"))
{
parser.printMessage();
return 0;
}
String modelFile = "OptimizedGraph.pb";
String imageFile = "img.JPG";
String inBlobName = "input";
String outBlobName = "side";
if (!parser.check())
{
parser.printErrors();
return 0;
}
String classNamesFile = "imagenet_comp_graph_label_strings.txt";
String resultFile = "output.txt";
//! [Initialize network]
dnn::Net net = readNetFromTensorflow(modelFile);
//! [Initialize network]
if (net.empty())
{
std::cerr << "Can't load network by using the mode file: " << std::endl;
std::cerr << modelFile << std::endl;
exit(-1);
}
//! [Prepare blob]
Mat img = imread(imageFile);
if (img.empty())
{
std::cerr << "Can't read image from the file: " << imageFile << std::endl;
exit(-1);
}
Mat inputBlob = blobFromImage(img, 0.00784, Size(160, 160),Scalar(127.5,127.5,127.5), true, false); //Convert Mat to batch of images
//! [Prepare blob]
inputBlob -= 117.0;
//! [Set input blob]
net.setInput(inputBlob, inBlobName); //set the network input
//! [Set input blob]
cv::TickMeter tm;
tm.start();
//! [Make forward pass]
Mat result = net.forward(outBlobName); //compute output
//! [Make forward pass]
tm.stop();
if (!resultFile.empty()) {
CV_Assert(result.isContinuous());
ofstream fout(resultFile.c_str(), ios::out | ios::binary);
fout.write((char*)result.data, result.total() * sizeof(float));
fout.close();
}
std::cout << "Output blob shape " << result.size[0] << " x " << result.size[1] << " x " << result.size[2] << " x " << result.size[3] << std::endl;
std::cout << "Inference time, ms: " << tm.getTimeMilli() << std::endl;
if (!classNamesFile.empty()) {
std::vector<String> classNames = readClassNames(classNamesFile.c_str());
int classId;
double classProb;
getMaxClass(result, &classId, &classProb);//find the best class
//! [Print results]
std::cout << "Best class: #" << classId << " '" << classNames.at(classId) << "'" << std::endl;
std::cout << "Probability: " << classProb * 100 << "%" << std::endl;
}
return 0;
} //main
/* Find best class for the blob (i. e. class with maximal probability) */
void getMaxClass(const Mat &probBlob, int *classId, double *classProb)
{
Mat probMat = probBlob.reshape(1, 1); //reshape the blob to 1x1000 matrix
Point classNumber;
minMaxLoc(probMat, NULL, classProb, NULL, &classNumber);
*classId = classNumber.x;
}
std::vector<String> readClassNames(const char *filename)
{
std::vector<String> classNames;
std::ifstream fp(filename);
if (!fp.is_open())
{
std::cerr << "File with classes labels not found: " << filename << std::endl;
exit(-1);
}
std::string name;
while (!fp.eof())
{
std::getline(fp, name);
if (name.length())
classNames.push_back(name);
}
fp.close();
return classNames;
}
</code></pre></div>
<p dir="auto">Exact output is as following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ INFO:0] Initialize OpenCL runtime...
Net Outputs(1):
side
Output blob shape 1 x 2 x 1090226688 x 427
Inference time, ms: 1178.1
Best class: #1 'class2'
Probability: 765.036% <-------- look at the bad prob score"><pre class="notranslate"><code class="notranslate">[ INFO:0] Initialize OpenCL runtime...
Net Outputs(1):
side
Output blob shape 1 x 2 x 1090226688 x 427
Inference time, ms: 1178.1
Best class: #1 'class2'
Probability: 765.036% <-------- look at the bad prob score
</code></pre></div>
<p dir="auto">My possible thoughts on why this is happening:</p>
<p dir="auto">In TF code, I get logits from tf.slim.fully_connected. I saved this by using<br>
<code class="notranslate">logits = tf.multiply(logits,1,name='output')</code>. Maybe this isn't the right way of saving output node?</p>
<p dir="auto">I'm not at liberty to share the .pb file, so any comments on how to solve this?</p> | 0 |
<p dir="auto">It looks like in version 3.x !important was added to .hide, the problem with this is that now when you use hide on an element and then try to use jquerys toggle functions the important is taking over and nothing happens. I've gotten around this by doing slideToggle().removeClass('hide'); but it's ugly and the first transition is not smooth at all. I'm not sure why hide has !important now but if possible it should be removed.</p> | <p dir="auto">I think this is lazy implementation and it breaks when using <code class="notranslate">$(elem).show()</code> or <code class="notranslate">$(elem).hide()</code> using jQuery since the hide class get more importance since the badly (IMO) use of <code class="notranslate">!important</code>.</p>
<p dir="auto">I think BT should not declare this so generics classes with !important, it makes difficult to customize. I don't like the idea of having another class for doing display: none because BT uses !important.</p>
<p dir="auto">In my opinion, having a rule like : <code class="notranslate">.hide { btn&, ul li&, etc.. { display:none; }}</code> isn't much work and won't break anything. also footprint shouldn't increase a lot since the .hide pattern will be greatly gzipped.</p>
<p dir="auto">right now, having a <code class="notranslate"><div id="someId" class="hide"></div></code> will break <code class="notranslate">$('#someId').show()</code> function of jQuery.</p> | 1 |
<p dir="auto">Consider a simplified version of <a href="https://github.com/borisyankov/DefinitelyTyped/blob/8f081073e6cb416f901b272810d8b04d6e01c9e0/nouislider/nouislider.d.ts">the .d.ts file for 'nouislider'</a>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="declare namespace myFramework {
interface Static {
create(blahArray: any[]): Instance;
}
interface Instance {
/**
* Returns 0, 1, or 2, depending on if the stars align.
*/
doFoo(): number
}
}
declare var myFramework: myFramework.Static;"><pre class="notranslate"><span class="pl-k">declare</span> <span class="pl-k">namespace</span> <span class="pl-s1">myFramework</span> <span class="pl-kos">{</span>
<span class="pl-k">interface</span> <span class="pl-smi">Static</span> <span class="pl-kos">{</span>
<span class="pl-c1">create</span><span class="pl-kos">(</span><span class="pl-s1">blahArray</span>: <span class="pl-smi">any</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span>: <span class="pl-smi">Instance</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">Instance</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns 0, 1, or 2, depending on if the stars align.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">doFoo</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">number</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">myFramework</span>: <span class="pl-s1">myFramework</span><span class="pl-kos">.</span><span class="pl-smi">Static</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><code class="notranslate">doFoo</code> currently returns one of 3 different values. <code class="notranslate">number</code> is a little more broad than one would prefer, so one might be tempted to say "I know, I'll use a const enum!":</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="declare namespace myFramework {
interface Static {
create(blahArray: any[]): Instance;
}
interface Instance {
/**
* Returns 0, 1, or 2, depending on if the stars align.
*/
doFoo(): number
}
const enum FooReturnValue {
StarsTotallyAlign,
StarsTotallyDontAlign,
EhCloseEnough
}
}
declare var myFramework: myFramework.Static;"><pre class="notranslate"><span class="pl-k">declare</span> <span class="pl-k">namespace</span> <span class="pl-s1">myFramework</span> <span class="pl-kos">{</span>
<span class="pl-k">interface</span> <span class="pl-smi">Static</span> <span class="pl-kos">{</span>
<span class="pl-c1">create</span><span class="pl-kos">(</span><span class="pl-s1">blahArray</span>: <span class="pl-smi">any</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span>: <span class="pl-smi">Instance</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">interface</span> <span class="pl-smi">Instance</span> <span class="pl-kos">{</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Returns 0, 1, or 2, depending on if the stars align.</span>
<span class="pl-c"> */</span>
<span class="pl-c1">doFoo</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">number</span>
<span class="pl-kos">}</span>
<span class="pl-k">const</span> <span class="pl-k">enum</span> <span class="pl-smi">FooReturnValue</span> <span class="pl-kos">{</span>
<span class="pl-c1">StarsTotallyAlign</span><span class="pl-kos">,</span>
<span class="pl-c1">StarsTotallyDontAlign</span><span class="pl-kos">,</span>
<span class="pl-c1">EhCloseEnough</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">declare</span> <span class="pl-k">var</span> <span class="pl-s1">myFramework</span>: <span class="pl-s1">myFramework</span><span class="pl-kos">.</span><span class="pl-smi">Static</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Now that person has two problems:</p>
<table role="table">
<thead>
<tr>
<th>Severity</th>
<th>Code</th>
<th>Description</th>
<th>File</th>
<th>Line</th>
</tr>
</thead>
<tbody>
<tr>
<td>Error</td>
<td>TS2300</td>
<td>Duplicate identifier 'myFramework'.</td>
<td>myFramework.ts</td>
<td>1</td>
</tr>
<tr>
<td>Error</td>
<td>TS2300</td>
<td>Duplicate identifier 'myFramework'.</td>
<td>myFramework.ts</td>
<td>20</td>
</tr>
</tbody>
</table>
<p dir="auto">Apparently, the <code class="notranslate">FooReturnValue</code> causes the namespace to be instantiated.</p>
<p dir="auto">Note:One might say that the solution is to just absorb <code class="notranslate">Static</code> into the <code class="notranslate">myFramework</code> namespace and just instantiate it there, which seems reasonable, but it is still an odd quirk that there is no way to control that a const enum can instantiate a module</p> | <p dir="auto">When using a tsconfig file with no <code class="notranslate">files</code> property all declaration files under node_modules are currently pulled in. This is especially problematic if typescript itself resides under node_modules since you wind up with duplicate identifiers from <code class="notranslate">lib.core.d.ts</code> and <code class="notranslate">lib.core.es6.d.ts</code>, etc. I realize this is partially taken care of with <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="73382462" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/3043" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/3043/hovercard" href="https://github.com/microsoft/TypeScript/issues/3043">#3043</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="77102652" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/3188" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/TypeScript/pull/3188/hovercard" href="https://github.com/microsoft/TypeScript/pull/3188">#3188</a> but I'm wondering if there should be a special default case of excluding typescript declaration files. Plugins for JS toolchains like <a href="https://github.com/ivogabe/gulp-typescript/blob/master/package.json">gulp-typescript</a> and <a href="https://github.com/jbrantly/ts-loader/blob/master/package.json">ts-loader</a> pull in typescript locally so this becomes an issue there.</p>
<p dir="auto">Edit: Repro steps for TS 1.5 beta</p>
<ol dir="auto">
<li><code class="notranslate">mkdir test</code></li>
<li><code class="notranslate">cd test</code></li>
<li><code class="notranslate">npm install typescript</code> (install locally, not globally)</li>
<li><code class="notranslate">touch tsconfig.json</code></li>
<li><code class="notranslate">./node_modules/typescript/bin/tsc</code></li>
</ol> | 0 |
<p dir="auto">Right now you can only dispatch native events to the DOM nodes, but there's not any way to dispatch synthetic events on the Virtual DOM nodes.</p>
<p dir="auto">I'd like to be able to dispatch synthetic events, in addition, I'd like a way to define custom event listeners.</p>
<h2 dir="auto">Usecase</h2>
<p dir="auto">For example, I've a component decorator that adds a <code class="notranslate">resize</code> event on a DOM element when it get resized. I'd like to be able to dispatch the <code class="notranslate">resize</code> event to such element and be able to listen to it using <code class="notranslate">onResize</code>.</p>
<p dir="auto">Example:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function DecoratedComponent(props) {
return <div onResize={evt => console.log('resized')}>foobar</div>;
}
resizeAware(DecoratedComponent);"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-v">DecoratedComponent</span><span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-c1"><</span><span class="pl-ent">div</span> <span class="pl-c1">onResize</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">evt</span> <span class="pl-c1">=></span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'resized'</span><span class="pl-kos">)</span><span class="pl-kos">}</span><span class="pl-c1">></span>foobar<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">resizeAware</span><span class="pl-kos">(</span><span class="pl-v">DecoratedComponent</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">For reference, this is the logic of my decorator that would dispatch the event.<br>
<a href="https://gist.github.com/FezVrasta/0324991bbdf044fd2723eebbc344adff">https://gist.github.com/FezVrasta/0324991bbdf044fd2723eebbc344adff</a></p>
<p dir="auto">As you see, right now I'm using <code class="notranslate">findDOMNode(this.componentNode).dispatchEvent(new Event('resize'))</code> which makes the <code class="notranslate">resize</code> event available only to the real DOM node.<br>
This means that I must listen for the event in this way:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class DecoratedComponent extends React.Component {
componentDidMount() {
findDOMNode(this).addEventListener('resize', evt => console.log('resized'));
}
render() {
return <div>foobar</div>;
}
}
resizeAware(DecoratedComponent);"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">DecoratedComponent</span> <span class="pl-k">extends</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span> <span class="pl-kos">{</span>
<span class="pl-en">componentDidMount</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-en">findDOMNode</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">addEventListener</span><span class="pl-kos">(</span><span class="pl-s">'resize'</span><span class="pl-kos">,</span> <span class="pl-s1">evt</span> <span class="pl-c1">=></span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'resized'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-c1"><</span><span class="pl-ent">div</span><span class="pl-c1">></span>foobar<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-en">resizeAware</span><span class="pl-kos">(</span><span class="pl-v">DecoratedComponent</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">This is very inconvenient and not flexible. We'd need a way to dispatch synthetic events and be able to listen to them using the <code class="notranslate">onSomething</code> properties.</p>
<p dir="auto">I think it would be a great addition to React.</p> | <p dir="auto">From Twitter: <a href="https://twitter.com/Vjeux/status/569985084524081153" rel="nofollow">https://twitter.com/Vjeux/status/569985084524081153</a></p>
<p dir="auto">When using PhantomJS for testing browser interaction, often times what seems to happen is that values get changed directly on the DOM elements and then the 'change' event is triggered on the element. Because of this, interacting with ReactJS elements through PhantomJS and through jQuery doesn't work for some interactive elements like <code class="notranslate"><input></code> and <code class="notranslate"><select></code>.</p>
<p dir="auto">Of course, the easiest solution is to take the real elements that are mounted and attach event listeners to them like <code class="notranslate">$(this.MyRef.getDOMNode()).on(EVENT, CALLBACK)</code>, but it isn't the most pleasant experience.</p>
<p dir="auto">Is there any interest in mirroring events on the real nodes to the synthetic events, or is this situation normal? I'd like to be able to interact with my application through PhantomJS, but this seems to be quite the blocker when interacting with input and select elements.</p>
<p dir="auto">JSBin example here: <a href="http://jsbin.com/xawogo/3/edit" rel="nofollow">http://jsbin.com/xawogo/3/edit</a></p> | 1 |
<p dir="auto">I tried adding unique keys everywhere but no luck.</p>
<p dir="auto">Probably this warning is due to an internal bug? Can you check that you assign unique keys in the iterator for table header contents?</p> | <h2 dir="auto">Summary</h2>
<p dir="auto">The <code class="notranslate">title</code> API of Tooltip is clashing with the <code class="notranslate">title</code> of <strong>StandardHtmlAttribute</strong>.</p>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">I expect no error will be thrown by TypeScript compiler when I assign a ReactNode to the <code class="notranslate">title</code> property of Tooltip.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">TypeScript compiler will throw an error saying that you cannot assign <code class="notranslate">ReactNode</code> to <code class="notranslate">string</code>.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Assume you are in a <code class="notranslate">*.ts</code> file and you are using TS compiler.</li>
<li>The following code will cause the TS compiler to throw an error.</li>
</ol>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const tooltipTitle = () => {
return (
<Typography type="body2" align="center">
{"Hey brother and sister"}
</Typography>
);
};
render () => {
return (
<Tooltip title={tooltipTitle()}> ... </Tooltip>
);
}"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-en">tooltipTitle</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-kos">(</span>
<span class="pl-c1"><</span><span class="pl-ent">Typography</span> <span class="pl-c1">type</span><span class="pl-c1">=</span><span class="pl-s">"body2"</span> <span class="pl-c1">align</span><span class="pl-c1">=</span><span class="pl-s">"center"</span><span class="pl-c1">></span>
<span class="pl-kos">{</span><span class="pl-s">"Hey brother and sister"</span><span class="pl-kos">}</span>
<span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">Typography</span><span class="pl-c1">></span>
<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-en">render</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=</span><span class="pl-c1">></span> <span class="pl-kos">{</span>
<span class="pl-c1">return</span> <span class="pl-kos">(</span>
<span class="pl-c1"><</span><span class="pl-ent">Tooltip</span> <span class="pl-c1">title</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-en">tooltipTitle</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">}</span><span class="pl-c1">></span> ... <span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">Tooltip</span><span class="pl-c1">></span>
<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<ol start="3" dir="auto">
<li>The error would look like the following :</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="message: 'Type '{ title: Element; placement: "bottom"; children: Element; }' is not assignable to type 'IntrinsicAttributes & HTMLAttributes<HTMLDivElement> & { disableTriggerFocus?: boolean; disableTr...'.
Type '{ title: Element; placement: "bottom"; children: Element; }' is not assignable to type 'HTMLAttributes<HTMLDivElement>'.
Types of property 'title' are incompatible.
Type 'Element' is not assignable to type 'string'.'
source: 'ts'"><pre class="notranslate"><code class="notranslate">message: 'Type '{ title: Element; placement: "bottom"; children: Element; }' is not assignable to type 'IntrinsicAttributes & HTMLAttributes<HTMLDivElement> & { disableTriggerFocus?: boolean; disableTr...'.
Type '{ title: Element; placement: "bottom"; children: Element; }' is not assignable to type 'HTMLAttributes<HTMLDivElement>'.
Types of property 'title' are incompatible.
Type 'Element' is not assignable to type 'string'.'
source: 'ts'
</code></pre></div>
<h2 dir="auto">Why does this happen ?</h2>
<p dir="auto">Apparently, this is due to the clashing API for <code class="notranslate">title</code> in StandardHtmlAttribute and TooltipProperty :</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Tooltip.d.ts
export type TooltipProps = React.HTMLAttributes<HTMLDivElement> & {
...
title: React.ReactNode;
...
}"><pre class="notranslate"><span class="pl-c">// Tooltip.d.ts</span>
<span class="pl-k">export</span> <span class="pl-k">type</span> <span class="pl-smi">TooltipProps</span> <span class="pl-c1">=</span> <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-smi">HTMLAttributes</span><span class="pl-kos"><</span><span class="pl-smi">HTMLDivElement</span><span class="pl-kos">></span> <span class="pl-c1">&</span> <span class="pl-kos">{</span>
...
<span class="pl-c1">title</span>: <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-smi">ReactNode</span><span class="pl-kos">;</span>
...
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// index.d.ts
interface HTMLAttributes<T> extends DOMAttributes<T> {
....
// Standard HTML Attributes
title?: string;
...."><pre class="notranslate"><span class="pl-c">// index.d.ts</span>
<span class="pl-k">interface</span> <span class="pl-smi">HTMLAttributes</span><span class="pl-c1"><</span><span class="pl-smi">T</span><span class="pl-c1">></span> <span class="pl-k">extends</span> <span class="pl-smi">DOMAttributes</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">></span> <span class="pl-kos">{</span>
...<span class="pl-kos">.</span>
<span class="pl-c">// Standard HTML Attributes</span>
<span class="pl-c1">title</span>?: <span class="pl-smi">string</span><span class="pl-kos">;</span>
...<span class="pl-kos">.</span></pre></div>
<p dir="auto">Due to this reason, the TypeScript compiler is confused about the <code class="notranslate">title</code> property.</p>
<h2 dir="auto">Proposed solution</h2>
<p dir="auto">Rename <code class="notranslate">title</code> property of Tooltip into <code class="notranslate">tooltipBody</code> .</p>
<h2 dir="auto">Context</h2>
<p dir="auto">Typescript</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>v1-beta</td>
</tr>
</tbody>
</table>
<h3 dir="auto">Tags</h3>
<p dir="auto">TypeScript, v1-beta</p> | 0 |
<h2 dir="auto"><g-emoji class="g-emoji" alias="information_source" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png">ℹ</g-emoji> Computer information</h2>
<ul dir="auto">
<li>PowerToys version: 0.21.1</li>
<li>PowerToy Utility: n/a</li>
<li>Running PowerToys as Admin: no</li>
<li>Windows build number: 19042.450</li>
</ul>
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide detailed reproduction steps (if any)</h2>
<ol dir="auto">
<li>open powertoys</li>
<li>maximise settings window</li>
</ol>
<h3 dir="auto">✔️ Expected result</h3>
<p dir="auto">titlebar is same size as uwp apps</p>
<h3 dir="auto"><g-emoji class="g-emoji" alias="x" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/274c.png">❌</g-emoji> Actual result</h3>
<p dir="auto">titlebar is not the same size</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="camera" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4f7.png">📷</g-emoji> Screenshots</h2>
<p dir="auto"><em>Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form</em></p>
<p dir="auto">PowerToys:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/51363864/92320257-932f4a80-f063-11ea-935e-9679ede7ff18.png"><img src="https://user-images.githubusercontent.com/51363864/92320257-932f4a80-f063-11ea-935e-9679ede7ff18.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Feedback Hub (I tried to find a UWP app that follows the enable coloured title bars setting. lol you can see the bug where here is a massive gap next to the back button. and that missing top 1px border. rip testers.):<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/51363864/92320343-22d4f900-f064-11ea-8441-28d7a1934d83.png"><img src="https://user-images.githubusercontent.com/51363864/92320343-22d4f900-f064-11ea-8441-28d7a1934d83.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">PowerToys, maximised:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/51363864/92320398-83fccc80-f064-11ea-8177-8afffbfe4136.png"><img src="https://user-images.githubusercontent.com/51363864/92320398-83fccc80-f064-11ea-8177-8afffbfe4136.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Feedback Hub, maximised:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/51363864/92320382-6cbddf00-f064-11ea-807f-5eabb40fcf5b.png"><img src="https://user-images.githubusercontent.com/51363864/92320382-6cbddf00-f064-11ea-807f-5eabb40fcf5b.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">This happens to a bunch of win32 apps. The icons of the caption buttons are also positioned slightly differently between UWP apps and apps like Chromium, which doesn't have a pre-windows 10 sized titlebar when maximised. This may be a Project Reunion issue or a duplicate. Oh and I noticed that the navigation pane in powertoys is darker than other apps</p> | <h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">The current WPF runner app holds a XAML island with the NavigationView. Ideally the NavigationView would flow into the title bar, like most Windows 10 apps. For this, we'd need to create a custom WPF titlebar.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">Create a custom styling control that holds a custom minimize, maximize and close button. Background should be transparent so the NavView can flow to the top.</p>
<p dir="auto">Left: UWP, right: WPF<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9866362/76471809-04af7880-63f4-11ea-99a2-cd81f6b0af99.png"><img src="https://user-images.githubusercontent.com/9866362/76471809-04af7880-63f4-11ea-99a2-cd81f6b0af99.png" alt="image" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">I have updated my app to the latest beta and now the typography of the title in the AppBar has changed. <a href="https://material-ui-next.com/demos/app-bar/" rel="nofollow">In this demos</a> the title is shown correctly, but if you open them in the code sandbox the title <a href="https://codesandbox.io/s/mj111k223y" rel="nofollow">looks like this.</a></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">The title should look like this:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9933709/35793329-77e94a32-0a51-11e8-9b09-177a586822c4.png"><img src="https://user-images.githubusercontent.com/9933709/35793329-77e94a32-0a51-11e8-9b09-177a586822c4.png" alt="expected" style="max-width: 100%;"></a></p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The title looks like this:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9933709/35793357-9d4e9fd4-0a51-11e8-9218-4f0c59158481.png"><img src="https://user-images.githubusercontent.com/9933709/35793357-9d4e9fd4-0a51-11e8-9218-4f0c59158481.png" alt="latest" style="max-width: 100%;"></a></p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Codesandbox link <a href="https://codesandbox.io/s/mj111k223y" rel="nofollow">here</a>.</p>
<ol dir="auto">
<li>Simply insert any AppBar example of the demo site with a title.</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">It's a bug.</p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>1.0.0-beta.32</td>
</tr>
<tr>
<td>React</td>
<td>16.2.0</td>
</tr>
<tr>
<td>browser</td>
<td>64.0.3282.140</td>
</tr>
</tbody>
</table> | <p dir="auto">When I build a project in production mode JSS generates non-deterministic class names in components views but styles definition is not changed at all.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">I expect to have it changed in both: HTML in <code class="notranslate">class</code> attribute and inisde <code class="notranslate"><style></code> tag.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto"><code class="notranslate"><div class="jss8 jss12 jss9"></code> is a result of <code class="notranslate"><Card></code> component but no styles for those classes are provided.<br>
There are still</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<style type="text/css" data-jss="" data-meta="MuiPaper">
.MuiPaperroot-0-3-1 {
background-color: #fff;
}
.MuiPaperrounded-0-3-2 {
border-radius: 2px;
}
...
</style>"><pre class="notranslate"><code class="notranslate"><style type="text/css" data-jss="" data-meta="MuiPaper">
.MuiPaperroot-0-3-1 {
background-color: #fff;
}
.MuiPaperrounded-0-3-2 {
border-radius: 2px;
}
...
</style>
</code></pre></div>
<p dir="auto">injected into the <code class="notranslate"><head></code> section</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2236369/36175438-bdba8b88-110f-11e8-8790-137657af58fb.png"><img src="https://user-images.githubusercontent.com/2236369/36175438-bdba8b88-110f-11e8-8790-137657af58fb.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Main component:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ReactDOM.render(
<AppContainer>
<Provider store={store}>
<ConnectedRouter history={history} children={routes} />
</Provider>
</AppContainer>,
document.getElementById('react-app')
);"><pre class="notranslate"><code class="notranslate">ReactDOM.render(
<AppContainer>
<Provider store={store}>
<ConnectedRouter history={history} children={routes} />
</Provider>
</AppContainer>,
document.getElementById('react-app')
);
</code></pre></div>
<ol dir="auto">
<li>Build an app with any material-ui component</li>
<li>Build it for production</li>
</ol>
<p dir="auto">There is no point to show it in codesandbox.io since it can't build project in production mode.</p>
<h2 dir="auto">Context</h2>
<p dir="auto">When I build in production mode, no styles for Material-UI components are applied</p>
<h2 dir="auto">Your Environment</h2>
<p dir="auto">Started with <a href="https://github.com/aspnet/JavaScriptServices">https://github.com/aspnet/JavaScriptServices</a> boilerplate - React - Typescript. Introduced Material-UI instead of Bootstrap.</p>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>v1.0.0-beta.33</td>
</tr>
<tr>
<td>React</td>
<td>16.2.0</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 63.0.3239.132</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">It would be great to be able to specify the API dir location, please refer to <a href="https://spectrum.chat/next-js/general/next-9-is-there-a-config-option-to-change-where-the-api-dir-is-located~81da11ce-cd38-4fb5-bcda-9e95ee07db14" rel="nofollow">https://spectrum.chat/next-js/general/next-9-is-there-a-config-option-to-change-where-the-api-dir-is-located~81da11ce-cd38-4fb5-bcda-9e95ee07db14</a></p> | <h1 dir="auto">Feature request</h1>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<p dir="auto">Next.js v9.0.0 hard codes the route name of the API path: <code class="notranslate">/api/</code>.</p>
<p dir="auto"><a href="https://github.com/zeit/next.js/blob/71f9288a54c32420a18a07035ea7a73c9c3c50e5/packages/next/lib/constants.ts#L19">https://github.com/zeit/next.js/blob/71f9288a54c32420a18a07035ea7a73c9c3c50e5/packages/next/lib/constants.ts#L19</a></p>
<p dir="auto">In Material-UI, we host pages under the <code class="notranslate">/api/</code> folder. For instance: <a href="https://v3.material-ui.com/api/app-bar/" rel="nofollow">https://v3.material-ui.com/api/app-bar/</a>. It forces us to rename this folder. This has an SEO impact.</p>
<h2 dir="auto">Describe the solution you'd like</h2>
<p dir="auto">We would be interested in having an option to configure this path. For instance, I could imagine something like:</p>
<p dir="auto"><strong>next.config.js</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = {
apiRoutePath: 'json-api',
};"><pre class="notranslate"><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c1">apiRoutePath</span>: <span class="pl-s">'json-api'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<h2 dir="auto">Additional context</h2>
<ul dir="auto">
<li>The related thread on our side: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="473061495" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/16752" data-hovercard-type="pull_request" data-hovercard-url="/mui/material-ui/pull/16752/hovercard" href="https://github.com/mui/material-ui/pull/16752">mui/material-ui#16752</a></li>
<li>I had an initial discussion about the problem with <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timneutkens/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timneutkens">@timneutkens</a> on Twitter.</li>
<li>It seems relatively simple to implement as we have access to the config here:<br>
<a href="https://github.com/zeit/next.js/blob/71f9288a54c32420a18a07035ea7a73c9c3c50e5/packages/next/build/entries.ts#L51">https://github.com/zeit/next.js/blob/71f9288a54c32420a18a07035ea7a73c9c3c50e5/packages/next/build/entries.ts#L51</a></li>
</ul> | 1 |
<p dir="auto">Hello, I am using OS X EL Capitan(10.11.3) and vscode : Version 0.10.8 (0.10.8).<br>
Following steps gives me invalid result and code loss:</p>
<ol dir="auto">
<li>write few lines of code</li>
<li>select those lines (Shift+arrow key)<br>
3.press tab, and you will indent the code.<br>
4.But if you press cmd+s (for saving file) and again pressed a tab button(while the code is selected already), the code vanishes leaving behind 3-4 last characters of those lines.</li>
</ol>
<p dir="auto">My concern is before indenting the selected code with tab button if you pressed cmd+s :+1 it should not affect the indentation or replace it with unwanted code.</p>
<p dir="auto">Hope you are able to replicate it :)<br>
Thanks in advance..</p> | <p dir="auto">when I open 0.10.5, it is crashed.</p>
<p dir="auto">what I have do:<br>
I have deleted the old config folder ~/.vscode<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5959755/11953028/e053edda-a8d7-11e5-8f76-d50389c5cef6.png"><img width="1028" alt="2015-12-22 18 09 29" src="https://cloud.githubusercontent.com/assets/5959755/11953028/e053edda-a8d7-11e5-8f76-d50389c5cef6.png" style="max-width: 100%;"></a></p> | 0 |
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">getInitialProps that with dynamic import, ssr is ok, but have errors in client side</h2>
<p dir="auto"><strong>pages/index.js</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import React from "react";
import dynamic from "next/dynamic";
class Index extends React.Component {
static async getInitialProps() {
return { Hello: dynamic(import("../components/hello")) };
}
constructor(props) {
super(props);
console.log("props:", props);
}
render() {
const { Hello } = this.props;
console.log(this.props);
return (
<div>
<Hello />
</div>
);
}
}
export default Index;`"><pre class="notranslate"><code class="notranslate">import React from "react";
import dynamic from "next/dynamic";
class Index extends React.Component {
static async getInitialProps() {
return { Hello: dynamic(import("../components/hello")) };
}
constructor(props) {
super(props);
console.log("props:", props);
}
render() {
const { Hello } = this.props;
console.log(this.props);
return (
<div>
<Hello />
</div>
);
}
}
export default Index;`
</code></pre></div>
<p dir="auto"><strong>components/hello.js</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export default class hello extends React.Component{
render ()
{
return (<div>
<p>Hello Next.js</p>
</div>)
}
}"><pre class="notranslate"><code class="notranslate">export default class hello extends React.Component{
render ()
{
return (<div>
<p>Hello Next.js</p>
</div>)
}
}
</code></pre></div>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p>
<ol dir="auto">
<li>just start run the dev npm script</li>
<li><a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a></li>
<li>looks fine, but you will get lots of error in the browser console</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">i log out the props in the render method on purpose, we can see the content in compiler console, but got nothing in client side console.</p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/361781/50218743-f082f400-03c7-11e9-9ecd-52c7ffbe2470.png"><img src="https://user-images.githubusercontent.com/361781/50218743-f082f400-03c7-11e9-9ecd-52c7ffbe2470.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS:Windows10</li>
<li>Browser: chrome</li>
<li>Version of Next.js:7.0.2</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">if we don't use dynamic import but do some simple data api request in getInitialProps, we found that the data recorded inside props would keeped in both server and client side, hope the componens that dynamic import can also shared both server side and client side</p> | <p dir="auto">Following directions to clone and run with-dynamic import and run dev yields following error:</p>
<p dir="auto">Module not found: Error: Can't resolve 'react-dom/lib/ReactReconciler' in '/home/terry/myProjects/next/with-dynamic-import/node_modules/next/dist/client'<br>
@ ./node_modules/next/dist/client/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-dev">next-dev</a>.js 5:23-63<br>
@ multi ./node_modules/next/dist/client/webpack-hot-middleware-client ./node_modules/next/dist/client/on-demand-entries-client ./node_modules/next/dist/client/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-dev">next-dev</a>.js</p>
<ul dir="auto">
<li>[x ] I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">It should run without errors.</p>
<h2 dir="auto">Current Behavior</h2>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
<h2 dir="auto">Context</h2>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>downloaded from examples repository</td>
</tr>
<tr>
<td>node</td>
<td>8.0.0</td>
</tr>
<tr>
<td>OS</td>
<td>ubuntu 16.04</td>
</tr>
<tr>
<td>browser</td>
<td>chrome</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | 0 |
<h5 dir="auto">Issue Type:</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">Ansible Version:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.0 (devel 2db3f290ba) last updated 2016/02/24 13:31:18 (GMT +200)
lib/ansible/modules/core: (detached HEAD 7162623e86) last updated 2016/02/24 13:31:26 (GMT +200)
lib/ansible/modules/extras: (detached HEAD f5e798f13c) last updated 2016/02/24 13:31:29 (GMT +200)
config file =
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.1.0 (devel 2db3f290ba) last updated 2016/02/24 13:31:18 (GMT +200)
lib/ansible/modules/core: (detached HEAD 7162623e86) last updated 2016/02/24 13:31:26 (GMT +200)
lib/ansible/modules/extras: (detached HEAD f5e798f13c) last updated 2016/02/24 13:31:29 (GMT +200)
config file =
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">Ansible Configuration:</h5>
<p dir="auto">None.</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Control machine: OS X 10.11.3<br>
Managed OS: Debian Wheezy</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">I have a domain that I want to be appended to all hosts in the inventory. To reduce duplication, I thought I'd set ansible_host={{inventory_hostname}}.osf.credativ.lan.</p>
<p dir="auto">Unfortunately, this breaks with delegation. Ansible connects to the play host, not to the host I delegated to, because of the template evaluation.</p>
<p dir="auto">I found this issue on GitHub: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="69570091" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/10781" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/10781/hovercard" href="https://github.com/ansible/ansible/issues/10781">#10781</a>. It seems like a related problem at least, but to me it's not clear from the issue status whether it had been fixed or not.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Playbook:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- hosts: osf4-management1
gather_facts: no
tasks:
- ping:
- ping:
delegate_to: osf4-nfs1"><pre class="notranslate"><code class="notranslate">- hosts: osf4-management1
gather_facts: no
tasks:
- ping:
- ping:
delegate_to: osf4-nfs1
</code></pre></div>
<p dir="auto">Inventory:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="osf4-management1
osf4-nfs1
[all:vars]
ansible_host={{inventory_hostname}}.osf.credativ.lan"><pre class="notranslate"><code class="notranslate">osf4-management1
osf4-nfs1
[all:vars]
ansible_host={{inventory_hostname}}.osf.credativ.lan
</code></pre></div>
<p dir="auto">Command:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-playbook -i hosts playbook.yml -vvv"><pre class="notranslate"><code class="notranslate">$ ansible-playbook -i hosts playbook.yml -vvv
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<ul dir="auto">
<li>The first task executes on osf4-management1.osf.credativ.lan</li>
<li>The second task executes on osf4-nfs1.osf.credativ.lan</li>
</ul>
<h5 dir="auto">Actual Results:</h5>
<ul dir="auto">
<li>The first task executes on osf4-management1.osf.credativ.lan</li>
<li>The second task executes on osf4-management1.osf.credativ.lan</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="No config file found; using defaults
PLAYBOOK: playbook.yml *********************************************************
1 plays in playbook.yml
PLAY ***************************************************************************
TASK [ping] ********************************************************************
task path: /Users/mga/Documents/Arbeitsmittel/Ansible-Bug mit ansible_host Template/playbook.yml:4
<osf4-management1.osf.credativ.lan> ESTABLISH SSH CONNECTION FOR USER: None
<osf4-management1.osf.credativ.lan> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r -tt osf4-management1.osf.credativ.lan '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1456317417.59-102056864626582 `" && echo "` echo $HOME/.ansible/tmp/ansible-tmp-1456317417.59-102056864626582 `" )'"'"''
<osf4-management1.osf.credativ.lan> PUT /var/folders/0w/8d7_0wfn4_5_rytt3201v0k00000gn/T/tmpyww60G TO /home/mga/.ansible/tmp/ansible-tmp-1456317417.59-102056864626582/ping
<osf4-management1.osf.credativ.lan> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r '[osf4-management1.osf.credativ.lan]'
<osf4-management1.osf.credativ.lan> ESTABLISH SSH CONNECTION FOR USER: None
<osf4-management1.osf.credativ.lan> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r -tt osf4-management1.osf.credativ.lan '/bin/sh -c '"'"'LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 /usr/bin/python /home/mga/.ansible/tmp/ansible-tmp-1456317417.59-102056864626582/ping; rm -rf "/home/mga/.ansible/tmp/ansible-tmp-1456317417.59-102056864626582/" > /dev/null 2>&1'"'"''
ok: [osf4-management1] => {"changed": false, "invocation": {"module_args": {"data": null}, "module_name": "ping"}, "ping": "pong"}
TASK [ping] ********************************************************************
task path: /Users/mga/Documents/Arbeitsmittel/Ansible-Bug mit ansible_host Template/playbook.yml:5
<osf4-management1.osf.credativ.lan> ESTABLISH SSH CONNECTION FOR USER: None
<osf4-management1.osf.credativ.lan> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r -tt osf4-management1.osf.credativ.lan '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1456317417.91-272755064275497 `" && echo "` echo $HOME/.ansible/tmp/ansible-tmp-1456317417.91-272755064275497 `" )'"'"''
<osf4-management1.osf.credativ.lan> PUT /var/folders/0w/8d7_0wfn4_5_rytt3201v0k00000gn/T/tmpRFvwTK TO /home/mga/.ansible/tmp/ansible-tmp-1456317417.91-272755064275497/ping
<osf4-management1.osf.credativ.lan> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r '[osf4-management1.osf.credativ.lan]'
<osf4-management1.osf.credativ.lan> ESTABLISH SSH CONNECTION FOR USER: None
<osf4-management1.osf.credativ.lan> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r -tt osf4-management1.osf.credativ.lan '/bin/sh -c '"'"'LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 /usr/bin/python /home/mga/.ansible/tmp/ansible-tmp-1456317417.91-272755064275497/ping; rm -rf "/home/mga/.ansible/tmp/ansible-tmp-1456317417.91-272755064275497/" > /dev/null 2>&1'"'"''
ok: [osf4-management1 -> {{inventory_hostname}}.osf.credativ.lan] => {"changed": false, "invocation": {"module_args": {"data": null}, "module_name": "ping"}, "ping": "pong"}
PLAY RECAP *********************************************************************
osf4-management1 : ok=2 changed=0 unreachable=0 failed=0
"><pre class="notranslate"><code class="notranslate">No config file found; using defaults
PLAYBOOK: playbook.yml *********************************************************
1 plays in playbook.yml
PLAY ***************************************************************************
TASK [ping] ********************************************************************
task path: /Users/mga/Documents/Arbeitsmittel/Ansible-Bug mit ansible_host Template/playbook.yml:4
<osf4-management1.osf.credativ.lan> ESTABLISH SSH CONNECTION FOR USER: None
<osf4-management1.osf.credativ.lan> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r -tt osf4-management1.osf.credativ.lan '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1456317417.59-102056864626582 `" && echo "` echo $HOME/.ansible/tmp/ansible-tmp-1456317417.59-102056864626582 `" )'"'"''
<osf4-management1.osf.credativ.lan> PUT /var/folders/0w/8d7_0wfn4_5_rytt3201v0k00000gn/T/tmpyww60G TO /home/mga/.ansible/tmp/ansible-tmp-1456317417.59-102056864626582/ping
<osf4-management1.osf.credativ.lan> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r '[osf4-management1.osf.credativ.lan]'
<osf4-management1.osf.credativ.lan> ESTABLISH SSH CONNECTION FOR USER: None
<osf4-management1.osf.credativ.lan> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r -tt osf4-management1.osf.credativ.lan '/bin/sh -c '"'"'LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 /usr/bin/python /home/mga/.ansible/tmp/ansible-tmp-1456317417.59-102056864626582/ping; rm -rf "/home/mga/.ansible/tmp/ansible-tmp-1456317417.59-102056864626582/" > /dev/null 2>&1'"'"''
ok: [osf4-management1] => {"changed": false, "invocation": {"module_args": {"data": null}, "module_name": "ping"}, "ping": "pong"}
TASK [ping] ********************************************************************
task path: /Users/mga/Documents/Arbeitsmittel/Ansible-Bug mit ansible_host Template/playbook.yml:5
<osf4-management1.osf.credativ.lan> ESTABLISH SSH CONNECTION FOR USER: None
<osf4-management1.osf.credativ.lan> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r -tt osf4-management1.osf.credativ.lan '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1456317417.91-272755064275497 `" && echo "` echo $HOME/.ansible/tmp/ansible-tmp-1456317417.91-272755064275497 `" )'"'"''
<osf4-management1.osf.credativ.lan> PUT /var/folders/0w/8d7_0wfn4_5_rytt3201v0k00000gn/T/tmpRFvwTK TO /home/mga/.ansible/tmp/ansible-tmp-1456317417.91-272755064275497/ping
<osf4-management1.osf.credativ.lan> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r '[osf4-management1.osf.credativ.lan]'
<osf4-management1.osf.credativ.lan> ESTABLISH SSH CONNECTION FOR USER: None
<osf4-management1.osf.credativ.lan> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/mga/.ansible/cp/ansible-ssh-%h-%p-%r -tt osf4-management1.osf.credativ.lan '/bin/sh -c '"'"'LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 /usr/bin/python /home/mga/.ansible/tmp/ansible-tmp-1456317417.91-272755064275497/ping; rm -rf "/home/mga/.ansible/tmp/ansible-tmp-1456317417.91-272755064275497/" > /dev/null 2>&1'"'"''
ok: [osf4-management1 -> {{inventory_hostname}}.osf.credativ.lan] => {"changed": false, "invocation": {"module_args": {"data": null}, "module_name": "ping"}, "ping": "pong"}
PLAY RECAP *********************************************************************
osf4-management1 : ok=2 changed=0 unreachable=0 failed=0
</code></pre></div> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">2.0.0-0.6.rc1</p>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">service_module</p>
<p dir="auto">It was mentioned as became available in ansible 2.0 in doc: <a href="http://docs.ansible.com/ansible/service_module.html" rel="nofollow">http://docs.ansible.com/ansible/service_module.html</a> . It also was work as described.</p>
<p dir="auto">In recent versions (2.0.0-0.6.rc1) it produce error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [egais.db.slave1]: FAILED! => {"changed": false, "failed": true, "msg": "unsupported parameter for module: must_exist"}"><pre class="notranslate"><code class="notranslate">fatal: [egais.db.slave1]: FAILED! => {"changed": false, "failed": true, "msg": "unsupported parameter for module: must_exist"}
</code></pre></div>
<p dir="auto">And doc does not contain it.</p>
<p dir="auto">Is that dropped? Why?</p> | 0 |
<p dir="auto">Similar to iTerm works, when you cmd+click a URL it opens in the default browser. Likewise, it would also be nice to have an "Open Selection as URL" in the right-click context menu.</p>
<p dir="auto">Atom already underlines URLs in every language, so I imagine implementing this would be trivial.</p> | <p dir="auto">I think it's a pretty classic shortcut</p> | 1 |
<p dir="auto">I am unable to build <code class="notranslate">clang</code> on OSX with <code class="notranslate">BUILD_LLVM_CLANG</code> in <code class="notranslate">Make.user</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cd /Users/kevin/Source/julia-cxx/deps/scratch/llvm-svn/build_Release+Asserts/projects/compiler-rt/lib/builtins && \
/usr/bin/clang -stdlib=libc++ -mmacosx-version-min=10.8 \
-m64 -D_DEBUG -D__STDC_CONSTANT_MACROS \
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS \
-I/Users/kevin/Source/julia-cxx/deps/scratch/llvm-svn/build_Release+Asserts/projects/compiler-rt/lib/builtins \
-I/Users/kevin/Source/julia-cxx/deps/srccache/llvm-svn/projects/compiler-rt/lib/builtins \
-I/Users/kevin/Source/julia-cxx/deps/scratch/llvm-svn/build_Release+Asserts/include \
-I/Users/kevin/Source/julia-cxx/deps/srccache/llvm-svn/include -O3 -arch i386 -UNDEBUG \
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk \
-mmacosx-version-min=10.5 -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -arch i386 \
-o CMakeFiles/clang_rt.builtins_i386_osx.dir/absvsi2.c.o \
-c /Users/kevin/Source/julia-cxx/deps/srccache/llvm-svn/projects/compiler-rt/lib/builtins/absvsi2.c
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)"><pre class="notranslate"><code class="notranslate">cd /Users/kevin/Source/julia-cxx/deps/scratch/llvm-svn/build_Release+Asserts/projects/compiler-rt/lib/builtins && \
/usr/bin/clang -stdlib=libc++ -mmacosx-version-min=10.8 \
-m64 -D_DEBUG -D__STDC_CONSTANT_MACROS \
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS \
-I/Users/kevin/Source/julia-cxx/deps/scratch/llvm-svn/build_Release+Asserts/projects/compiler-rt/lib/builtins \
-I/Users/kevin/Source/julia-cxx/deps/srccache/llvm-svn/projects/compiler-rt/lib/builtins \
-I/Users/kevin/Source/julia-cxx/deps/scratch/llvm-svn/build_Release+Asserts/include \
-I/Users/kevin/Source/julia-cxx/deps/srccache/llvm-svn/include -O3 -arch i386 -UNDEBUG \
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk \
-mmacosx-version-min=10.5 -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -arch i386 \
-o CMakeFiles/clang_rt.builtins_i386_osx.dir/absvsi2.c.o \
-c /Users/kevin/Source/julia-cxx/deps/srccache/llvm-svn/projects/compiler-rt/lib/builtins/absvsi2.c
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
</code></pre></div>
<p dir="auto">I've tracked it down to a problem with flags: when compiling compiler-rt, an extra <code class="notranslate">-mmacosx-version-min=10.5</code> is inserted late in the argument list, overriding the <code class="notranslate">-mmacosx-version-min=10.8</code> on the second line.</p>
<p dir="auto">Solutions on the web suggest</p>
<ul dir="auto">
<li>defining the environment variable <code class="notranslate">MACOSX_DEPLOYMENT_TARGET=10.8</code></li>
<li>for cmake, adding <code class="notranslate">CMAKE_OSX_DEPLOYMENT_TARGET=10.8</code></li>
</ul>
<p dir="auto">I've tried each of these, and while the second has an effect (I see two instances of <code class="notranslate">-mmacosx-version-min=10.8</code> in compile commands), it also does not seem to propagate to compiler-rt. (Defining <code class="notranslate">MACOSX_DEPLOYMENT_TARGET=10.8</code> doesn't seem to do anything.)</p>
<p dir="auto">Thoughts on this? I was hoping to use <code class="notranslate">Cxx.jl</code>, although I'm wondering if I can get around this issue with a brew installed version...</p>
<p dir="auto">Cc: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Keno/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Keno">@Keno</a></p> | <p dir="auto">This is the standard directory, distributions prefer documentation to go to <code class="notranslate">$(docdir)/julia</code> [1], which defaults to <code class="notranslate">/usr/share/doc/julia</code>. I'll have a look, this is mostly a reminder for myself.</p>
<p dir="auto">By the way, by default calling <code class="notranslate">make && make install</code> you get the .rst installed directly. Maybe it would make more sense to compile this to HTML? Installing Python and configuration files does not make much sense either.</p>
<p dir="auto">The man page is also duplicated in <code class="notranslate">$(datarootdir)/julia/doc/man</code>. Not sure why.</p>
<p dir="auto">1: <a href="http://www.gnu.org/software/make/manual/html_node/Directory-Variables.html" rel="nofollow">http://www.gnu.org/software/make/manual/html_node/Directory-Variables.html</a></p> | 0 |
<p dir="auto">Make sure these boxes are checked before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the superset logs for python stacktraces and included it here as text if any</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have reproduced the issue with at least the latest released version of superset</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the issue tracker for the same issue and I haven't found one similar</li>
</ul>
<h3 dir="auto">Superset version</h3>
<h3 dir="auto">Expected results</h3>
<p dir="auto">New tab should create a blank tab</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">New tab creates a duplicate of the original tab. (ok, can live with this) But then once you start editing the new tab (ie. removing a chart), it makes the same edit to the original tab.</p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">(1) Convert existing dashboard to V2 dash<br>
(2) Edit dashboard<br>
(3) Click on + for new tab<br>
(4) Remove a chart from new tab</p> | <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/19161243/106393809-0b901100-6434-11eb-91ed-d954de344355.png"><img src="https://user-images.githubusercontent.com/19161243/106393809-0b901100-6434-11eb-91ed-d954de344355.png" alt="123456" style="max-width: 100%;"></a></p>
<p dir="auto">how should i configue it</p>
<p dir="auto">###############</p>
<p dir="auto">"""The main config file for Superset<br>
All configuration in this file can be overridden by providing a superset_config<br>
in your PYTHONPATH as there is a <code class="notranslate">from superset_config import *</code><br>
at the end of this file.<br>
"""<br>
import imp<br>
import importlib.util<br>
import json<br>
import logging<br>
import os<br>
import sys<br>
from collections import OrderedDict<br>
from datetime import date<br>
from typing import Any, Callable, Dict, List, Optional, Type, TYPE_CHECKING<br>
from cachelib.base import BaseCache<br>
from celery.schedules import crontab<br>
from dateutil import tz<br>
from flask import Blueprint<br>
from flask_appbuilder.security.manager import AUTH_DB<br>
from pandas.io.parsers import STR_NA_VALUES<br>
BaseTemplateProcessor,<br>
)<br>
from superset.stats_logger import DummyStatsLogger<br>
from superset.typing import CacheConfig<br>
from superset.utils.core import is_test<br>
from superset.utils.log import DBEventLogger<br>
from superset.utils.logging_configurator import DefaultLoggingConfigurator<br>
logger = logging.getLogger(<strong>name</strong>)<br>
if TYPE_CHECKING:<br>
STATS_LOGGER = DummyStatsLogger()<br>
EVENT_LOGGER = DBEventLogger()<br>
SUPERSET_LOG_VIEW = True<br>
BASE_DIR = os.path.abspath(os.path.dirname(<strong>file</strong>))<br>
if "SUPERSET_HOME" in os.environ:<br>
DATA_DIR = os.environ["SUPERSET_HOME"]<br>
else:<br>
DATA_DIR = os.path.join(os.path.expanduser("~"), ".superset")<br>
VERSION_INFO_FILE = os.path.join(BASE_DIR, "static", "version_info.json")<br>
PACKAGE_JSON_FILE = os.path.join(BASE_DIR, "static", "assets", "package.json")<br>
FAVICONS = [{"href": "/static/assets/images/favicon.png"}]<br>
def _try_json_readversion(filepath: str) -> Optional[str]:<br>
try:<br>
with open(filepath, "r") as f:<br>
return json.load(f).get("version")<br>
return None<br>
filepath: str, length: int<br>
) -> Optional[str]:<br>
try:<br>
with open(filepath, "r") as f:<br>
return json.load(f).get("GIT_SHA")[:length]<br>
return None<br>
VERSION_STRING = _try_json_readversion(VERSION_INFO_FILE) or _try_json_readversion(<br>
PACKAGE_JSON_FILE<br>
)<br>
VERSION_SHA_LENGTH = 8<br>
VERSION_SHA = _try_json_readsha(VERSION_INFO_FILE, VERSION_SHA_LENGTH)<br>
ROW_LIMIT = 50000<br>
VIZ_ROW_LIMIT = 10000<br>
SAMPLES_ROW_LIMIT = 1000<br>
FILTER_SELECT_ROW_LIMIT = 10000<br>
SUPERSET_WEBSERVER_PROTOCOL = "http"<br>
SUPERSET_WEBSERVER_ADDRESS = "0.0.0.0"<br>
SUPERSET_WEBSERVER_PORT = 8088<br>
SUPERSET_WEBSERVER_TIMEOUT = 60<br>
SUPERSET_DASHBOARD_PERIODICAL_REFRESH_LIMIT = 0<br>
SUPERSET_DASHBOARD_PERIODICAL_REFRESH_WARNING_MESSAGE = None<br>
SUPERSET_DASHBOARD_POSITION_DATA_LIMIT = 65535<br>
CUSTOM_SECURITY_MANAGER = None<br>
SQLALCHEMY_TRACK_MODIFICATIONS = False<br>
SECRET_KEY = "\2\1thisismyscretkey\1\2\e\y\y\h"<br>
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(DATA_DIR, "superset.db")<br>
SQLALCHEMY_CUSTOM_PASSWORD_STORE = None<br>
QUERY_SEARCH_LIMIT = 1000<br>
WTF_CSRF_ENABLED = True<br>
WTF_CSRF_EXEMPT_LIST = ["superset.views.core.log", "superset.charts.api.data"]<br>
DEBUG = os.environ.get("FLASK_ENV") == "development"<br>
FLASK_USE_RELOAD = True<br>
SHOW_STACKTRACE = True<br>
ENABLE_PROXY_FIX = False<br>
PROXY_FIX_CONFIG = {"x_for": 1, "x_proto": 1, "x_host": 1, "x_port": 1, "x_prefix": 1}<br>
APP_NAME = "Superset"<br>
APP_ICON = "/static/assets/images/superset-logo-horiz.png"<br>
APP_ICON_WIDTH = 126<br>
LOGO_TARGET_PATH = None<br>
FAB_API_SWAGGER_UI = True<br>
DRUID_TZ = tz.tzutc()<br>
DRUID_ANALYSIS_TYPES = ["cardinality"]<br>
DRUID_IS_ACTIVE = False<br>
DRUID_METADATA_LINKS_ENABLED = True<br>
AUTH_TYPE = AUTH_DB<br>
PUBLIC_ROLE_LIKE: Optional[str] = None<br>
BABEL_DEFAULT_LOCALE = "en"<br>
BABEL_DEFAULT_FOLDER = "superset/translations"<br>
LANGUAGES = {<br>
"en": {"flag": "us", "name": "English"},<br>
"es": {"flag": "es", "name": "Spanish"},<br>
"it": {"flag": "it", "name": "Italian"},<br>
"fr": {"flag": "fr", "name": "French"},<br>
"zh": {"flag": "cn", "name": "Chinese"},<br>
"ja": {"flag": "jp", "name": "Japanese"},<br>
"de": {"flag": "de", "name": "German"},<br>
"pt": {"flag": "pt", "name": "Portuguese"},<br>
"pt_BR": {"flag": "br", "name": "Brazilian Portuguese"},<br>
"ru": {"flag": "ru", "name": "Russian"},<br>
"ko": {"flag": "kr", "name": "Korean"},<br>
}<br>
LANGUAGES = {}<br>
DEFAULT_FEATURE_FLAGS: Dict[str, bool] = {<br>
"ALLOW_DASHBOARD_DOMAIN_SHARDING": True,<br>
"CLIENT_CACHE": False,<br>
"DISABLE_DATASET_SOURCE_EDIT": False,<br>
"DYNAMIC_PLUGINS": False,<br>
"ENABLE_EXPLORE_JSON_CSRF_PROTECTION": False,<br>
"ENABLE_TEMPLATE_PROCESSING": False,<br>
"KV_STORE": False,<br>
"PRESTO_EXPAND_DATA": False,<br>
"THUMBNAILS": False,<br>
"DASHBOARD_CACHE": False,<br>
"REMOVE_SLICE_LEVEL_LABEL_COLORS": False,<br>
"SHARE_QUERIES_VIA_KV_STORE": False,<br>
"SIP_38_VIZ_REARCHITECTURE": False,<br>
"TAGGING_SYSTEM": False,<br>
"SQLLAB_BACKEND_PERSISTENCE": False,<br>
"LISTVIEWS_DEFAULT_CARD_VIEW": False,<br>
"ENABLE_REACT_CRUD_VIEWS": True,<br>
"DISPLAY_MARKDOWN_HTML": True,<br>
"ESCAPE_MARKDOWN_HTML": False,<br>
"DASHBOARD_NATIVE_FILTERS": False,<br>
"GLOBAL_ASYNC_QUERIES": False,<br>
"VERSIONED_EXPORT": False,<br>
"ROW_LEVEL_SECURITY": False,<br>
"ALERT_REPORTS": False,<br>
"OMNIBAR": False,<br>
}<br>
if DEFAULT_FEATURE_FLAGS["THUMBNAILS"]:<br>
DEFAULT_FEATURE_FLAGS["LISTVIEWS_DEFAULT_CARD_VIEW"] = True<br>
FEATURE_FLAGS: Dict[str, bool] = {}<br>
GET_FEATURE_FLAGS_FUNC: Optional[Callable[[Dict[str, bool]], Dict[str, bool]]] = None<br>
EXTRA_CATEGORICAL_COLOR_SCHEMES: List[Dict[str, Any]] = []<br>
EXTRA_SEQUENTIAL_COLOR_SCHEMES: List[Dict[str, Any]] = []<br>
THUMBNAIL_SELENIUM_USER = "admin"<br>
THUMBNAIL_CACHE_CONFIG: CacheConfig = {<br>
"CACHE_TYPE": "null",<br>
"CACHE_NO_NULL_WARNING": True,<br>
}<br>
SCREENSHOT_LOCATE_WAIT = 10<br>
SCREENSHOT_LOAD_WAIT = 60<br>
UPLOAD_FOLDER = BASE_DIR + "/app/static/uploads/"<br>
UPLOAD_CHUNK_SIZE = 4096<br>
IMG_UPLOAD_FOLDER = BASE_DIR + "/app/static/uploads/"<br>
IMG_UPLOAD_URL = "/static/uploads/"<br>
CACHE_CONFIG: CacheConfig = {"CACHE_TYPE": "null"}<br>
DATA_CACHE_CONFIG: CacheConfig = {"CACHE_TYPE": "null"}<br>
STORE_CACHE_KEYS_IN_METADATA_DB = False<br>
ENABLE_CORS = False<br>
CORS_OPTIONS: Dict[Any, Any] = {}<br>
SUPERSET_WEBSERVER_DOMAINS = None<br>
EXCEL_EXTENSIONS = {"xlsx", "xls"}<br>
CSV_EXTENSIONS = {"csv", "tsv", "txt"}<br>
ALLOWED_EXTENSIONS = {*EXCEL_EXTENSIONS, <em>CSV_EXTENSIONS}<br>
CSV_EXPORT = {"encoding": "utf-8"}<br>
TIME_GRAIN_DENYLIST: List[str] = []<br>
TIME_GRAIN_ADDONS: Dict[str, str] = {}<br>
TIME_GRAIN_ADDON_EXPRESSIONS: Dict[str, Dict[str, str]] = {}<br>
VIZ_TYPE_DENYLIST: List[str] = []<br>
DRUID_DATA_SOURCE_DENYLIST: List[str] = []<br>
DEFAULT_MODULE_DS_MAP = OrderedDict(<br>
[<br>
("superset.connectors.sqla.models", ["SqlaTable"]),<br>
("superset.connectors.druid.models", ["DruidDatasource"]),<br>
]<br>
)<br>
ADDITIONAL_MODULE_DS_MAP: Dict[str, List[str]] = {}<br>
ADDITIONAL_MIDDLEWARE: List[Callable[..., Any]] = []<br>
LOGGING_CONFIGURATOR = DefaultLoggingConfigurator()<br>
LOG_FORMAT = "%(asctime)s:%(levelname)s:%(name)s:%(message)s"<br>
LOG_LEVEL = "DEBUG"<br>
ENABLE_TIME_ROTATE = False<br>
TIME_ROTATE_LOG_LEVEL = "DEBUG"<br>
FILENAME = os.path.join(DATA_DIR, "superset.log")<br>
ROLLOVER = "midnight"<br>
INTERVAL = 1<br>
BACKUP_COUNT = 30<br>
QUERY_LOGGER = None<br>
MAPBOX_API_KEY = os.environ.get("MAPBOX_API_KEY", "")<br>
SQL_MAX_ROW = 100000<br>
DISPLAY_MAX_ROW = 10000<br>
DEFAULT_SQLLAB_LIMIT = 1000<br>
MAX_TABLE_NAMES = 3000<br>
SQLLAB_SAVE_WARNING_MESSAGE = None<br>
SQLLAB_SCHEDULE_WARNING_MESSAGE = None<br>
BROKER_URL = "sqla+sqlite:///celerydb.sqlite"<br>
CELERY_IMPORTS = ("superset.sql_lab", "superset.tasks")<br>
CELERY_RESULT_BACKEND = "db+sqlite:///celery_results.sqlite"<br>
CELERYD_LOG_LEVEL = "DEBUG"<br>
CELERYD_PREFETCH_MULTIPLIER = 1<br>
CELERY_ACKS_LATE = False<br>
CELERY_ANNOTATIONS = {<br>
"sql_lab.get_sql_results": {"rate_limit": "100/s"},<br>
"email_reports.send": {<br>
"rate_limit": "1/s",<br>
"time_limit": 120,<br>
"soft_time_limit": 150,<br>
"ignore_result": True,<br>
},<br>
}<br>
CELERYBEAT_SCHEDULE = {<br>
"email_reports.schedule_hourly": {<br>
"task": "email_reports.schedule_hourly",<br>
"schedule": crontab(minute=1, hour="</em>"),<br>
}<br>
}<br>
DEFAULT_HTTP_HEADERS: Dict[str, Any] = {}<br>
OVERRIDE_HTTP_HEADERS: Dict[str, Any] = {}<br>
HTTP_HEADERS: Dict[str, Any] = {}<br>
DEFAULT_DB_ID = None<br>
SQLLAB_TIMEOUT = 30<br>
SQLLAB_VALIDATION_TIMEOUT = 10<br>
SQLLAB_DEFAULT_DBID = None<br>
SQLLAB_ASYNC_TIME_LIMIT_SEC = 60 * 60 * 6<br>
ESTIMATE_QUERY_COST = False<br>
SQLLAB_CTAS_NO_LIMIT = False<br>
SQLLAB_CTAS_SCHEMA_NAME_FUNC: Optional[<br>
Callable[["Database", "models.User", str, str], str]<br>
] = None<br>
RESULTS_BACKEND: Optional[BaseCache] = None<br>
RESULTS_BACKEND_USE_MSGPACK = True<br>
CSV_TO_HIVE_UPLOAD_S3_BUCKET = None<br>
CSV_TO_HIVE_UPLOAD_DIRECTORY = "EXTERNAL_HIVE_TABLES/"<br>
CSV_TO_HIVE_UPLOAD_DIRECTORY_FUNC: Callable[<br>
["Database", "models.User", str], Optional[str]<br>
] = lambda database, user, schema: CSV_TO_HIVE_UPLOAD_DIRECTORY<br>
UPLOADED_CSV_HIVE_NAMESPACE: Optional[str] = None<br>
ALLOWED_USER_CSV_SCHEMA_FUNC: Callable[["Database", "models.User"], List[str]] = (<br>
lambda database, user: [UPLOADED_CSV_HIVE_NAMESPACE]<br>
if UPLOADED_CSV_HIVE_NAMESPACE<br>
else []<br>
)<br>
CSV_DEFAULT_NA_NAMES = list(STR_NA_VALUES)<br>
JINJA_CONTEXT_ADDONS: Dict[str, Callable[..., Any]] = {}<br>
CUSTOM_TEMPLATE_PROCESSORS: Dict[str, Type[BaseTemplateProcessor]] = {}<br>
ROBOT_PERMISSION_ROLES = ["Public", "Gamma", "Alpha", "Admin", "sql_lab"]<br>
CONFIG_PATH_ENV_VAR = "SUPERSET_CONFIG_PATH"<br>
FLASK_APP_MUTATOR = None<br>
ENABLE_ACCESS_REQUEST = False<br>
SMTP_HOST = "localhost"<br>
SMTP_STARTTLS = True<br>
SMTP_SSL = False<br>
SMTP_USER = "superset"<br>
SMTP_PORT = 25<br>
SMTP_PASSWORD = "superset"<br>
SMTP_MAIL_FROM = "<a href="mailto:[email protected]">[email protected]</a>"<br>
ENABLE_CHUNK_ENCODING = False<br>
SILENCE_FAB = True<br>
FAB_ADD_SECURITY_VIEWS = True<br>
FAB_ADD_SECURITY_PERMISSION_VIEW = False<br>
FAB_ADD_SECURITY_VIEW_MENU_VIEW = False<br>
FAB_ADD_SECURITY_PERMISSION_VIEWS_VIEW = False<br>
TROUBLESHOOTING_LINK = ""<br>
WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 7<br>
PERMISSION_INSTRUCTIONS_LINK = ""<br>
BLUEPRINTS: List[Blueprint] = []<br>
TRACKING_URL_TRANSFORMER = lambda x: x<br>
HIVE_POLL_INTERVAL = 5<br>
PRESTO_POLL_INTERVAL = 1<br>
ENABLE_JAVASCRIPT_CONTROLS = False<br>
DASHBOARD_TEMPLATE_ID = None<br>
DB_CONNECTION_MUTATOR = None<br>
SQL_QUERY_MUTATOR = None<br>
ENABLE_SCHEDULED_EMAIL_REPORTS = False<br>
ENABLE_ALERTS = False<br>
ALERT_REPORTS_CRON_WINDOW_SIZE = 59<br>
SLACK_API_TOKEN = None<br>
SLACK_PROXY = None<br>
SCHEDULED_EMAIL_DEBUG_MODE = False<br>
MACHINE_AUTH_PROVIDER_CLASS = "superset.utils.machine_auth.MachineAuthProvider"<br>
EMAIL_REPORTS_CRON_RESOLUTION = 15<br>
EMAIL_ASYNC_TIME_LIMIT_SEC = 300<br>
EMAIL_REPORT_FROM_ADDRESS = "<a href="mailto:[email protected]">[email protected]</a>"<br>
EMAIL_REPORT_BCC_ADDRESS = None<br>
EMAIL_REPORTS_USER = "admin"<br>
EMAIL_REPORTS_SUBJECT_PREFIX = "[Report] "<br>
WEBDRIVER_TYPE = "firefox"<br>
WEBDRIVER_WINDOW = {"dashboard": (1600, 2000), "slice": (3000, 1200)}<br>
WEBDRIVER_AUTH_FUNC = None<br>
WEBDRIVER_CONFIGURATION: Dict[Any, Any] = {}<br>
WEBDRIVER_OPTION_ARGS = [<br>
"--force-device-scale-factor=2.0",<br>
"--high-dpi-support=2.0",<br>
"--headless",<br>
]<br>
WEBDRIVER_BASEURL = "<a href="http://0.0.0.0:8080/" rel="nofollow">http://0.0.0.0:8080/</a>"<br>
WEBDRIVER_BASEURL_USER_FRIENDLY = WEBDRIVER_BASEURL<br>
EMAIL_PAGE_RENDER_WAIT = 30<br>
BUG_REPORT_URL = None<br>
DOCUMENTATION_URL = None<br>
DOCUMENTATION_TEXT = "Documentation"<br>
DEFAULT_RELATIVE_START_TIME = "today"<br>
DEFAULT_RELATIVE_END_TIME = "today"<br>
SQL_VALIDATORS_BY_ENGINE = {<br>
"presto": "PrestoDBSQLValidator",<br>
"postgresql": "PostgreSQLValidator",<br>
}<br>
TALISMAN_ENABLED = False<br>
TALISMAN_CONFIG = {<br>
"content_security_policy": None,<br>
"force_https": True,<br>
"force_https_permanent": False,<br>
}<br>
RLS_FORM_QUERY_REL_FIELDS: Optional[Dict[str, List[List[Any]]]] = None<br>
SQLALCHEMY_EXAMPLES_URI = None<br>
PREVENT_UNSAFE_DB_CONNECTIONS = True<br>
SSL_CERT_PATH: Optional[str] = None<br>
SIP_15_ENABLED = True<br>
SIP_15_DEFAULT_TIME_RANGE_ENDPOINTS = ["unknown", "inclusive"]<br>
SIP_15_TOAST_MESSAGE = (<br>
"Action Required: Preview then save your chart using the "<br>
'new time range endpoints <a target="_blank" href="{url}" '<br>
'class="alert-link">here.'<br>
)<br>
SQLA_TABLE_MUTATOR = lambda table: table<br>
GLOBAL_ASYNC_QUERIES_REDIS_CONFIG = {<br>
"port": 6379,<br>
"host": "127.0.0.1",<br>
"password": "",<br>
"db": 0,<br>
}<br>
GLOBAL_ASYNC_QUERIES_REDIS_STREAM_PREFIX = "async-events-"<br>
GLOBAL_ASYNC_QUERIES_REDIS_STREAM_LIMIT = 1000<br>
GLOBAL_ASYNC_QUERIES_REDIS_STREAM_LIMIT_FIREHOSE = 1000000<br>
GLOBAL_ASYNC_QUERIES_JWT_COOKIE_NAME = "async-token"<br>
GLOBAL_ASYNC_QUERIES_JWT_COOKIE_SECURE = False<br>
GLOBAL_ASYNC_QUERIES_JWT_SECRET = "test-secret-change-me"<br>
GLOBAL_ASYNC_QUERIES_TRANSPORT = "polling"<br>
GLOBAL_ASYNC_QUERIES_POLLING_DELAY = 500<br>
if CONFIG_PATH_ENV_VAR in os.environ:<br>
try:<br>
cfg_path = os.environ[CONFIG_PATH_ENV_VAR]<br>
module = sys.modules[<strong>name</strong>]<br>
override_conf = imp.load_source("superset_config", cfg_path)<br>
for key in dir(override_conf):<br>
if key.isupper():<br>
setattr(module, key, getattr(override_conf, key))<br>
print(f"Loaded your LOCAL configuration at [{cfg_path}]")<br>
except Exception:<br>
logger.exception(<br>
"Failed to import config for %s=%s", CONFIG_PATH_ENV_VAR, cfg_path<br>
)<br>
raise<br>
elif importlib.util.find_spec("superset_config") and not is_test():<br>
try:<br>
print(f"Loaded your LOCAL configuration at [{superset_config.<strong>file</strong>}]")<br>
except Exception:<br>
logger.exception("Found but failed to import local superset_config")<br>
raise<br>
DATASET_HEALTH_CHECK = None</p> | 0 |
<p dir="auto"><strong>Describe the bug</strong><br>
When upgrading from 0.19.0 to 0.19.1, our test suite breaks because <code class="notranslate">nock</code> receives the cors OPTIONS call, which it did not receive before and did not expect. This is a breaking change, and I wouldn't expect the OPTIONS call to be made during tests.</p>
<p dir="auto">Here's the error stack :</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Error: Error: Nock: No match for request {
"method": "OPTIONS",
"url": "http://some_url.org/",
"headers": {
"origin": "http://localhost",
"access-control-request-method": "PUT",
"user-agent": "Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0",
"host": "some_url.org",
"content-length": 0
}
}
at Object.dispatchError (/Users/somatt/www/hm/_hm/app/client/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:65:19)
at EventEmitter.<anonymous> (/Users/somatt/www/hm/_hm/app/client/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:676:20)
at EventEmitter.emit (events.js:215:7)
at Request.<anonymous> (/Users/somatt/www/hm/_hm/app/client/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:412:47)
at Request.emit (events.js:210:5)
at Request.onRequestError (/Users/somatt/www/hm/_hm/app/client/node_modules/request/request.js:881:8)
at OverriddenClientRequest.emit (events.js:210:5)
at /Users/somatt/www/hm/_hm/app/client/node_modules/nock/lib/intercepted_request_router.js:101:11
at processTicksAndRejections (internal/process/task_queues.js:75:11)
at runNextTicks (internal/process/task_queues.js:62:3) undefined"><pre class="notranslate">Error: Error: Nock: No match <span class="pl-k">for</span> request {
<span class="pl-s"><span class="pl-pds">"</span>method<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>OPTIONS<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>url<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>http://some_url.org/<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>headers<span class="pl-pds">"</span></span>: {
<span class="pl-s"><span class="pl-pds">"</span>origin<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>http://localhost<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>access-control-request-method<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>PUT<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>user-agent<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>host<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>some_url.org<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>content-length<span class="pl-pds">"</span></span>: 0
}
}
at Object.dispatchError (/Users/somatt/www/hm/_hm/app/client/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:65:19)
at EventEmitter.<span class="pl-k"><</span>anonymous<span class="pl-k">></span> (/Users/somatt/www/hm/_hm/app/client/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:676:20)
at EventEmitter.emit (events.js:215:7)
at Request.<span class="pl-k"><</span>anonymous<span class="pl-k">></span> (/Users/somatt/www/hm/_hm/app/client/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:412:47)
at Request.emit (events.js:210:5)
at Request.onRequestError (/Users/somatt/www/hm/_hm/app/client/node_modules/request/request.js:881:8)
at OverriddenClientRequest.emit (events.js:210:5)
at /Users/somatt/www/hm/_hm/app/client/node_modules/nock/lib/intercepted_request_router.js:101:11
at processTicksAndRejections (internal/process/task_queues.js:75:11)
at runNextTicks (internal/process/task_queues.js:62:3) undefined</pre></div>
<p dir="auto"><strong>Expected behavior</strong><br>
Mostly, a patch version should not break anything and breaking changes should be documented.</p>
<p dir="auto"><strong>Environment:</strong></p>
<ul dir="auto">
<li>Axios Version 0.19.1</li>
<li>OS: OSX 10.15.3 (19D76)</li>
<li>nock: 11.7.0</li>
</ul> | <p dir="auto"><strong>Describe the bug</strong><br>
After upgrading axios from 0.19.0 to 0.19.1 all tests that use nock got broken. They now produce the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: Cross origin http://localhost forbidden"><pre lang="text" class="notranslate"><code class="notranslate">Error: Cross origin http://localhost forbidden
</code></pre></div>
<p dir="auto"><strong>To Reproduce</strong><br>
Repo with minimal test case that reproduces the issue: <a href="https://github.com/EvgenyOrekhov/js-framework/tree/axios-bug">https://github.com/EvgenyOrekhov/js-framework/tree/axios-bug</a>.</p>
<p dir="auto">Note that <a href="https://github.com/EvgenyOrekhov/js-framework/tree/150ebe811c9531b7699c030e7921514e469fe84e">previous commit</a> (which has axios 0.19.0) works fine, the test passes.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import axios from "axios";
import nock from "nock";
it("makes HTTP requests", async done => {
const scope = nock("https://example.com/foo/")
.get("/bar")
.reply(200, { foo: "bar" });
await axios.get("https://example.com/foo/bar");
scope.done();
done();
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">axios</span> <span class="pl-k">from</span> <span class="pl-s">"axios"</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-s1">nock</span> <span class="pl-k">from</span> <span class="pl-s">"nock"</span><span class="pl-kos">;</span>
<span class="pl-en">it</span><span class="pl-kos">(</span><span class="pl-s">"makes HTTP requests"</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-s1">done</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">scope</span> <span class="pl-c1">=</span> <span class="pl-en">nock</span><span class="pl-kos">(</span><span class="pl-s">"https://example.com/foo/"</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"/bar"</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-en">reply</span><span class="pl-kos">(</span><span class="pl-c1">200</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">foo</span>: <span class="pl-s">"bar"</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">axios</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"https://example.com/foo/bar"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">scope</span><span class="pl-kos">.</span><span class="pl-en">done</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">done</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior</strong><br>
The test should pass.</p>
<p dir="auto"><strong>Environment:</strong></p>
<ul dir="auto">
<li>Axios Version: 0.19.1</li>
<li>OS: Ubuntu 19.10</li>
<li>Browser: n/a</li>
<li>Browser Version: n/a</li>
<li>Additional Library Versions: nock 11.7.2</li>
</ul>
<p dir="auto"><strong>Additional context/Screenshots</strong><br>
Jest error with stack trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" FAIL src/http.test.js
✕ makes HTTP requests (34ms)
● makes HTTP requests
Network Error
at createError (node_modules/axios/lib/core/createError.js:16:15)
at XMLHttpRequest.handleError (node_modules/axios/lib/adapters/xhr.js:83:14)
at XMLHttpRequest.<anonymous> (node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.js:33:32)
at invokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:193:27)
at XMLHttpRequestEventTargetImpl._dispatch (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:119:9)
at XMLHttpRequestEventTargetImpl.dispatchEvent (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:82:17)
at XMLHttpRequest.dispatchEvent (node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:157:21)
at requestErrorSteps (node_modules/jsdom/lib/jsdom/living/xhr-utils.js:132:7)
at dispatchError (node_modules/jsdom/lib/jsdom/living/xhr-utils.js:62:3)
at Object.validCORSHeaders (node_modules/jsdom/lib/jsdom/living/xhr-utils.js:77:5)
at receiveResponse (node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:847:21)
at Request.<anonymous> (node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:679:38)
at Request.onRequestResponse (node_modules/request/request.js:1066:10)
at respond (node_modules/nock/lib/playback_interceptor.js:299:11)
at respondUsingInterceptor (node_modules/nock/lib/playback_interceptor.js:341:7)
at node_modules/nock/lib/playback_interceptor.js:281:7
console.error node_modules/jsdom/lib/jsdom/virtual-console.js:29
Error: Cross origin http://localhost forbidden
at dispatchError (/home/user/my-app/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:65:19)
at Object.validCORSHeaders (/home/user/my-app/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:77:5)
at receiveResponse (/home/user/my-app/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:847:21)
at Request.<anonymous> (/home/user/my-app/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:679:38)
at Request.emit (events.js:321:20)
at Request.onRequestResponse (/home/user/my-app/node_modules/request/request.js:1066:10)
at OverriddenClientRequest.emit (events.js:321:20)
at respond (/home/user/my-app/node_modules/nock/lib/playback_interceptor.js:299:11)
at respondUsingInterceptor (/home/user/my-app/node_modules/nock/lib/playback_interceptor.js:341:7)
at /home/user/my-app/node_modules/nock/lib/playback_interceptor.js:281:7 undefined"><pre lang="text" class="notranslate"><code class="notranslate"> FAIL src/http.test.js
✕ makes HTTP requests (34ms)
● makes HTTP requests
Network Error
at createError (node_modules/axios/lib/core/createError.js:16:15)
at XMLHttpRequest.handleError (node_modules/axios/lib/adapters/xhr.js:83:14)
at XMLHttpRequest.<anonymous> (node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.js:33:32)
at invokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:193:27)
at XMLHttpRequestEventTargetImpl._dispatch (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:119:9)
at XMLHttpRequestEventTargetImpl.dispatchEvent (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:82:17)
at XMLHttpRequest.dispatchEvent (node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:157:21)
at requestErrorSteps (node_modules/jsdom/lib/jsdom/living/xhr-utils.js:132:7)
at dispatchError (node_modules/jsdom/lib/jsdom/living/xhr-utils.js:62:3)
at Object.validCORSHeaders (node_modules/jsdom/lib/jsdom/living/xhr-utils.js:77:5)
at receiveResponse (node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:847:21)
at Request.<anonymous> (node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:679:38)
at Request.onRequestResponse (node_modules/request/request.js:1066:10)
at respond (node_modules/nock/lib/playback_interceptor.js:299:11)
at respondUsingInterceptor (node_modules/nock/lib/playback_interceptor.js:341:7)
at node_modules/nock/lib/playback_interceptor.js:281:7
console.error node_modules/jsdom/lib/jsdom/virtual-console.js:29
Error: Cross origin http://localhost forbidden
at dispatchError (/home/user/my-app/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:65:19)
at Object.validCORSHeaders (/home/user/my-app/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:77:5)
at receiveResponse (/home/user/my-app/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:847:21)
at Request.<anonymous> (/home/user/my-app/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:679:38)
at Request.emit (events.js:321:20)
at Request.onRequestResponse (/home/user/my-app/node_modules/request/request.js:1066:10)
at OverriddenClientRequest.emit (events.js:321:20)
at respond (/home/user/my-app/node_modules/nock/lib/playback_interceptor.js:299:11)
at respondUsingInterceptor (/home/user/my-app/node_modules/nock/lib/playback_interceptor.js:341:7)
at /home/user/my-app/node_modules/nock/lib/playback_interceptor.js:281:7 undefined
</code></pre></div> | 1 |
<p dir="auto">Using latest next.js relase and a simple hello world index page with 0 dependencies fails to run on heroku with the following error:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ Error: Cannot find module '/tmp/build_xxx/node_modules/babel-runtime/helpers/inherits'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/app/.next/dist/pages/index.js:7:18)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3) code: 'MODULE_NOT_FOUND' }"><pre class="notranslate"><span class="pl-kos">{</span> Error: <span class="pl-v">Cannot</span> <span class="pl-s1">find</span> <span class="pl-smi">module</span> <span class="pl-s">'/tmp/build_xxx/node_modules/babel-runtime/helpers/inherits'</span>
<span class="pl-s1">at</span> <span class="pl-v">Function</span><span class="pl-kos">.</span><span class="pl-c1">Module</span><span class="pl-kos">.</span><span class="pl-en">_resolveFilename</span> <span class="pl-kos">(</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">455</span>:<span class="pl-c1">15</span><span class="pl-kos">)</span>
<span class="pl-s1">at</span> <span class="pl-v">Function</span><span class="pl-kos">.</span><span class="pl-c1">Module</span><span class="pl-kos">.</span><span class="pl-en">_load</span> <span class="pl-kos">(</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">403</span>:<span class="pl-c1">25</span><span class="pl-kos">)</span>
<span class="pl-s1">at</span> <span class="pl-v">Module</span><span class="pl-kos">.</span><span class="pl-en">require</span> <span class="pl-kos">(</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">483</span>:<span class="pl-c1">17</span><span class="pl-kos">)</span>
<span class="pl-en">at</span> <span class="pl-en">require</span> <span class="pl-kos">(</span><span class="pl-s1">internal</span><span class="pl-c1">/</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">20</span>:<span class="pl-c1">19</span><span class="pl-kos">)</span>
<span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1"><</span><span class="pl-s1">anonymous</span><span class="pl-c1">></span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>app<span class="pl-c1">/</span></span><span class="pl-kos">.</span><span class="pl-c1">next</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">/</span><span class="pl-s1">pages</span><span class="pl-c1">/</span><span class="pl-s1">index</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">7</span>:<span class="pl-c1">18</span><span class="pl-kos">)</span>
<span class="pl-s1">at</span> <span class="pl-v">Module</span><span class="pl-kos">.</span><span class="pl-en">_compile</span> <span class="pl-kos">(</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">556</span>:<span class="pl-c1">32</span><span class="pl-kos">)</span>
<span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">Module</span><span class="pl-kos">.</span><span class="pl-c1">_extensions</span><span class="pl-kos">.</span><span class="pl-kos">.</span><span class="pl-en">js</span> <span class="pl-kos">(</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">565</span>:<span class="pl-c1">10</span><span class="pl-kos">)</span>
<span class="pl-s1">at</span> <span class="pl-v">Module</span><span class="pl-kos">.</span><span class="pl-en">load</span> <span class="pl-kos">(</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">473</span>:<span class="pl-c1">32</span><span class="pl-kos">)</span>
<span class="pl-s1">at</span><span class="pl-kos"></span> <span class="pl-en">tryModuleLoad</span> <span class="pl-kos">(</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">432</span>:<span class="pl-c1">12</span><span class="pl-kos">)</span>
<span class="pl-s1">at</span> <span class="pl-v">Function</span><span class="pl-kos">.</span><span class="pl-c1">Module</span><span class="pl-kos">.</span><span class="pl-en">_load</span> <span class="pl-kos">(</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">424</span>:<span class="pl-c1">3</span><span class="pl-kos">)</span><span class="pl-kos"></span> code: <span class="pl-s">'MODULE_NOT_FOUND'</span> <span class="pl-kos">}</span></pre></div> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<h2 dir="auto">Current Behavior</h2>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
<h2 dir="auto">Context</h2>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td></td>
</tr>
<tr>
<td>node</td>
<td></td>
</tr>
<tr>
<td>OS</td>
<td></td>
</tr>
<tr>
<td>browser</td>
<td></td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">Currently, each RESTStorage implementation has its own storage object, which eventually ends up being the same etcd instance for all components.</p>
<p dir="auto">We should consider instead having apiserver pass a storage destination into each RESTStorage method. This would make it much more clear how to write plugins, both those that you compile into the master binary, and those that are external binaries.</p>
<p dir="auto">This would also let us eventually do fancy things like sharding (or isolating) keys across different etcd clusters without having to make sweeping changes to all the storage objects.</p>
<p dir="auto">(See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="43092134" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/1355" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/1355/hovercard" href="https://github.com/kubernetes/kubernetes/pull/1355">#1355</a>, which sparked this)</p> | <p dir="auto">k8s has been working with builds up to yesterday. Today I did a pull, cluster/kube-down.sh, hack/dev-build-and-up.sh</p>
<p dir="auto">No apparent errors during build but the "waiting for cluster initialization" never finishes.<br>
There are errors in the master apiserver.log, controller-manager.log and scheduler.log. I have included snippets of each log below. I can post entire log files if needed.</p>
<p dir="auto">The last commit on this pull: commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/kubernetes/kubernetes/commit/87278a6f561036b4ead3a0be8a305aecec6ec65f/hovercard" href="https://github.com/kubernetes/kubernetes/commit/87278a6f561036b4ead3a0be8a305aecec6ec65f"><tt>87278a6</tt></a></p>
<p dir="auto">scheduler.log</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E0904 17:56:20.755368 14056 reflector.go:77] unexpected watch close
E0904 17:56:20.755474 14056 reflector.go:77] unexpected watch close
E0904 17:56:21.756530 14056 reflector.go:77] unexpected watch close"><pre class="notranslate"><code class="notranslate">E0904 17:56:20.755368 14056 reflector.go:77] unexpected watch close
E0904 17:56:20.755474 14056 reflector.go:77] unexpected watch close
E0904 17:56:21.756530 14056 reflector.go:77] unexpected watch close
</code></pre></div>
<p dir="auto">controller-manager.log</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E0904 17:56:05.192929 11254 replication_controller.go:185] Synchronization error: request [&http.Request{Method:"GET", URL:(*url.URL)(0xc21000b4d0), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{}, Body:io.
ReadCloser(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:"127.0.0.1:8080", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:
"", RequestURI:"", TLS:(*tls.ConnectionState)(nil)}] failed (500) 500 Internal Server Error: {"kind":"Status","creationTimestamp":null,"apiVersion":"v1beta1","status":"failure","message":"501: All the given peers are not reac
hable (Tried to connect to each peer twice and failed) [0]","code":500} (&errors.errorString{s:"request [&http.Request{Method:\"GET\", URL:(*url.URL)(0xc21000b4d0), Proto:\"HTTP/1.1\", ProtoMajor:1, ProtoMinor:1, Header:http.
Header{}, Body:io.ReadCloser(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:\"127.0.0.1:8080\", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Head
er(nil), RemoteAddr:\"\", RequestURI:\"\", TLS:(*tls.ConnectionState)(nil)}] failed (500) 500 Internal Server Error: {\"kind\":\"Status\",\"creationTimestamp\":null,\"apiVersion\":\"v1beta1\",\"status\":\"failure\",\"message\
":\"501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]\",\"code\":500}"})"><pre class="notranslate"><code class="notranslate">E0904 17:56:05.192929 11254 replication_controller.go:185] Synchronization error: request [&http.Request{Method:"GET", URL:(*url.URL)(0xc21000b4d0), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{}, Body:io.
ReadCloser(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:"127.0.0.1:8080", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:
"", RequestURI:"", TLS:(*tls.ConnectionState)(nil)}] failed (500) 500 Internal Server Error: {"kind":"Status","creationTimestamp":null,"apiVersion":"v1beta1","status":"failure","message":"501: All the given peers are not reac
hable (Tried to connect to each peer twice and failed) [0]","code":500} (&errors.errorString{s:"request [&http.Request{Method:\"GET\", URL:(*url.URL)(0xc21000b4d0), Proto:\"HTTP/1.1\", ProtoMajor:1, ProtoMinor:1, Header:http.
Header{}, Body:io.ReadCloser(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:\"127.0.0.1:8080\", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Head
er(nil), RemoteAddr:\"\", RequestURI:\"\", TLS:(*tls.ConnectionState)(nil)}] failed (500) 500 Internal Server Error: {\"kind\":\"Status\",\"creationTimestamp\":null,\"apiVersion\":\"v1beta1\",\"status\":\"failure\",\"message\
":\"501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]\",\"code\":500}"})
</code></pre></div>
<p dir="auto">apiserver.log (pattern repeated many times)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I0904 17:55:06.740711 08443 apiserver.go:62] -machines is overwritten by -minion_regexp
E0904 17:55:07.656846 08443 healthy_registry.go:77] kubernetes-minion-1.c.rxwikiborg.internal failed health check with error: Get http://kubernetes-minion-1.c.rxwikiborg.internal:10250/healthz: dial tcp 10.240.28.63:10250: connection refused
E0904 17:55:07.714646 08443 healthy_registry.go:77] kubernetes-minion-2.c.rxwikiborg.internal failed health check with error: Get http://kubernetes-minion-2.c.rxwikiborg.internal:10250/healthz: dial tcp 10.240.68.185:10250: connection refused
E0904 17:55:07.939884 08443 healthy_registry.go:77] kubernetes-minion-3.c.rxwikiborg.internal failed health check with error: Get http://kubernetes-minion-3.c.rxwikiborg.internal:10250/healthz: dial tcp 10.240.49.203:10250: connection refused
E0904 17:55:07.944329 08443 healthy_registry.go:77] kubernetes-minion-4.c.rxwikiborg.internal failed health check with error: Get http://kubernetes-minion-4.c.rxwikiborg.internal:10250/healthz: dial tcp 10.240.22.199:10250: connection refused
E0904 17:55:07.944772 08443 pod_cache.go:77] Error synchronizing container list: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
I0904 17:55:07.945144 08443 log.go:134] GET /api/v1beta1/services?labels=: (288.377us) 500
goroutine 25 [running]:
github.com/GoogleCloudPlatform/kubernetes/pkg/httplog.(*respLogger).WriteHeader(0xc2102f82a0, 0x1f4)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/httplog/log.go:153 +0x9c
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.writeJSON(0x1f4, 0x7fa5d4188770, 0xc21001fb40, 0x7023a0, 0xc2102ebbe0, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:157 +0x11f
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.errorJSON(0x7fa5d4199330, 0xc2102faba0, 0x7fa5d4188770, 0xc21001fb40, 0x7fa5d4199410, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:164 +0x7d
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).handleRESTStorage(0xc2102fa000, 0xc2102fd180, 0x1, 0x1, 0xc2101088f0, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:79 +0x496
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).ServeHTTP(0xc2102fa000, 0x7fa5d4199410, 0xc2102f82a0, 0xc2101088f0)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:49 +0x280
net/http.func·010(0x7fa5d4199410, 0xc2102f82a0, 0xc2101088f0)
/usr/local/go/src/pkg/net/http/server.go:1252 +0xb0
net/http.HandlerFunc.ServeHTTP(0xc210309840, 0x7fa5d4199410, 0xc2102f82a0, 0xc2101088f0)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
net/http.(*ServeMux).ServeHTTP(0xc2102fa030, 0x7fa5d4199410, 0xc2102f82a0, 0xc2101088f0)
/usr/local/go/src/pkg/net/http/server.go:1496 +0x163
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.func·002(0x7fa5d41993d8, 0xc2102ebaa0, 0xc2101088f0)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:140 +0x197
net/http.HandlerFunc.ServeHTTP(0xc21030c430, 0x7fa5d41993d8, 0xc2102ebaa0, 0xc2101088f0)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*defaultAPIServer).ServeHTTP(0xc2
E0904 17:55:07.945493 08443 endpoints_controller.go:51] Failed to list services: request [&http.Request{Method:"GET", URL:(*url.URL)(0xc21010e700), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{}, Body:io.ReadCloser(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:"127.0.0.1:8080", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"", RequestURI:"", TLS:(*tls.ConnectionState)(nil)}] failed (500) 500 Internal Server Error: {"kind":"Status","creationTimestamp":null,"apiVersion":"v1beta1","status":"failure","message":"501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]","code":500}
I0904 17:55:17.946028 08443 log.go:134] GET /api/v1beta1/services?labels=: (222.446us) 500
goroutine 25 [running]:
github.com/GoogleCloudPlatform/kubernetes/pkg/httplog.(*respLogger).WriteHeader(0xc2100388a0, 0x1f4)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/httplog/log.go:153 +0x9c
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.writeJSON(0x1f4, 0x7fa5d4188770, 0xc21001fb40, 0x7023a0, 0xc2102c3960, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:157 +0x11f
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.errorJSON(0x7fa5d4199330, 0xc2102e6db0, 0x7fa5d4188770, 0xc21001fb40, 0x7fa5d4199410, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:164 +0x7d
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).handleRESTStorage(0xc2102fa000, 0xc2102ee160, 0x1, 0x1, 0xc210037750, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:79 +0x496
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).ServeHTTP(0xc2102fa000, 0x7fa5d4199410, 0xc2100388a0, 0xc210037750)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:49 +0x280
net/http.func·010(0x7fa5d4199410, 0xc2100388a0, 0xc210037750)
/usr/local/go/src/pkg/net/http/server.go:1252 +0xb0
net/http.HandlerFunc.ServeHTTP(0xc210309840, 0x7fa5d4199410, 0xc2100388a0, 0xc210037750)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
net/http.(*ServeMux).ServeHTTP(0xc2102fa030, 0x7fa5d4199410, 0xc2100388a0, 0xc210037750)
/usr/local/go/src/pkg/net/http/server.go:1496 +0x163
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.func·002(0x7fa5d41993d8, 0xc2102c3780, 0xc210037750)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:140 +0x197
net/http.HandlerFunc.ServeHTTP(0xc21030c430, 0x7fa5d41993d8, 0xc2102c3780, 0xc210037750)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*defaultAPIServer).ServeHTTP(0xc2
E0904 17:55:17.946325 08443 endpoints_controller.go:51] Failed to list services: request [&http.Request{Method:"GET", URL:(*url.URL)(0xc210071a10), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{}, Body:io.ReadCloser(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:"127.0.0.1:8080", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"
", RequestURI:"", TLS:(*tls.ConnectionState)(nil)}] failed (500) 500 Internal Server Error: {"kind":"Status","creationTimestamp":null,"apiVersion":"v1beta1","status":"failure","message":"501: All the given peers are not reach
able (Tried to connect to each peer twice and failed) [0]","code":500}
I0904 17:55:27.947293 08443 log.go:134] GET /api/v1beta1/services?labels=: (327.905us) 500
goroutine 25 [running]:
github.com/GoogleCloudPlatform/kubernetes/pkg/httplog.(*respLogger).WriteHeader(0xc210201000, 0x1f4)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/httplog/log.go:153 +0x9c
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.writeJSON(0x1f4, 0x7fa5d4188770, 0xc21001fb40, 0x7023a0, 0xc2102993c0, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:157 +0x11f
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.errorJSON(0x7fa5d4199330, 0xc2102d3780, 0x7fa5d4188770, 0xc21001fb40, 0x7fa5d4199410, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:164 +0x7d
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).handleRESTStorage(0xc2102fa000, 0xc2102eefb0, 0x1, 0x1, 0xc21028b340, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:79 +0x496
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).ServeHTTP(0xc2102fa000, 0x7fa5d4199410, 0xc210201000, 0xc21028b340)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:49 +0x280
net/http.func·010(0x7fa5d4199410, 0xc210201000, 0xc21028b340)
/usr/local/go/src/pkg/net/http/server.go:1252 +0xb0
net/http.HandlerFunc.ServeHTTP(0xc210309840, 0x7fa5d4199410, 0xc210201000, 0xc21028b340)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
net/http.(*ServeMux).ServeHTTP(0xc2102fa030, 0x7fa5d4199410, 0xc210201000, 0xc21028b340)
/usr/local/go/src/pkg/net/http/server.go:1496 +0x163
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.func·002(0x7fa5d41993d8, 0xc2102991e0, 0xc21028b340)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:140 +0x197
net/http.HandlerFunc.ServeHTTP(0xc21030c430, 0x7fa5d41993d8, 0xc2102991e0, 0xc21028b340)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*defaultAPIServer).ServeHTTP(0xc2
E0904 17:55:27.947560 08443 endpoints_controller.go:51] Failed to list services: request [&http.Request{Method:"GET", URL:(*url.URL)(0xc21000b850), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{}, Body:io.R
eadCloser(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:"127.0.0.1:8080", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"
", RequestURI:"", TLS:(*tls.ConnectionState)(nil)}] failed (500) 500 Internal Server Error: {"kind":"Status","creationTimestamp":null,"apiVersion":"v1beta1","status":"failure","message":"501: All the given peers are not reach
able (Tried to connect to each peer twice and failed) [0]","code":500}
E0904 17:55:37.945823 08443 pod_cache.go:77] Error synchronizing container list: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
I0904 17:55:37.948247 08443 log.go:134] GET /api/v1beta1/services?labels=: (261.546us) 500
goroutine 25 [running]:
github.com/GoogleCloudPlatform/kubernetes/pkg/httplog.(*respLogger).WriteHeader(0xc2101db6c0, 0x1f4)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/httplog/log.go:153 +0x9c
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.writeJSON(0x1f4, 0x7fa5d4188770, 0xc21001fb40, 0x7023a0, 0xc210299aa0, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:157 +0x11f
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.errorJSON(0x7fa5d4199330, 0xc2102c2660, 0x7fa5d4188770, 0xc21001fb40, 0x7fa5d4199410, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:164 +0x7d
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).handleRESTStorage(0xc2102fa000, 0xc2102d5060, 0x1, 0x1, 0xc21028b8f0, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:79 +0x496
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).ServeHTTP(0xc2102fa000, 0x7fa5d4199410, 0xc2101db6c0, 0xc21028b8f0)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:49 +0x280
net/http.func·010(0x7fa5d4199410, 0xc2101db6c0, 0xc21028b8f0)
/usr/local/go/src/pkg/net/http/server.go:1252 +0xb0
net/http.HandlerFunc.ServeHTTP(0xc210309840, 0x7fa5d4199410, 0xc2101db6c0, 0xc21028b8f0)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
net/http.(*ServeMux).ServeHTTP(0xc2102fa030, 0x7fa5d4199410, 0xc2101db6c0, 0xc21028b8f0)
/usr/local/go/src/pkg/net/http/server.go:1496 +0x163
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.func·002(0x7fa5d41993d8, 0xc210299960, 0xc21028b8f0)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:140 +0x197
net/http.HandlerFunc.ServeHTTP(0xc21030c430, 0x7fa5d41993d8, 0xc210299960, 0xc21028b8f0)"><pre class="notranslate"><code class="notranslate">I0904 17:55:06.740711 08443 apiserver.go:62] -machines is overwritten by -minion_regexp
E0904 17:55:07.656846 08443 healthy_registry.go:77] kubernetes-minion-1.c.rxwikiborg.internal failed health check with error: Get http://kubernetes-minion-1.c.rxwikiborg.internal:10250/healthz: dial tcp 10.240.28.63:10250: connection refused
E0904 17:55:07.714646 08443 healthy_registry.go:77] kubernetes-minion-2.c.rxwikiborg.internal failed health check with error: Get http://kubernetes-minion-2.c.rxwikiborg.internal:10250/healthz: dial tcp 10.240.68.185:10250: connection refused
E0904 17:55:07.939884 08443 healthy_registry.go:77] kubernetes-minion-3.c.rxwikiborg.internal failed health check with error: Get http://kubernetes-minion-3.c.rxwikiborg.internal:10250/healthz: dial tcp 10.240.49.203:10250: connection refused
E0904 17:55:07.944329 08443 healthy_registry.go:77] kubernetes-minion-4.c.rxwikiborg.internal failed health check with error: Get http://kubernetes-minion-4.c.rxwikiborg.internal:10250/healthz: dial tcp 10.240.22.199:10250: connection refused
E0904 17:55:07.944772 08443 pod_cache.go:77] Error synchronizing container list: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
I0904 17:55:07.945144 08443 log.go:134] GET /api/v1beta1/services?labels=: (288.377us) 500
goroutine 25 [running]:
github.com/GoogleCloudPlatform/kubernetes/pkg/httplog.(*respLogger).WriteHeader(0xc2102f82a0, 0x1f4)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/httplog/log.go:153 +0x9c
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.writeJSON(0x1f4, 0x7fa5d4188770, 0xc21001fb40, 0x7023a0, 0xc2102ebbe0, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:157 +0x11f
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.errorJSON(0x7fa5d4199330, 0xc2102faba0, 0x7fa5d4188770, 0xc21001fb40, 0x7fa5d4199410, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:164 +0x7d
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).handleRESTStorage(0xc2102fa000, 0xc2102fd180, 0x1, 0x1, 0xc2101088f0, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:79 +0x496
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).ServeHTTP(0xc2102fa000, 0x7fa5d4199410, 0xc2102f82a0, 0xc2101088f0)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:49 +0x280
net/http.func·010(0x7fa5d4199410, 0xc2102f82a0, 0xc2101088f0)
/usr/local/go/src/pkg/net/http/server.go:1252 +0xb0
net/http.HandlerFunc.ServeHTTP(0xc210309840, 0x7fa5d4199410, 0xc2102f82a0, 0xc2101088f0)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
net/http.(*ServeMux).ServeHTTP(0xc2102fa030, 0x7fa5d4199410, 0xc2102f82a0, 0xc2101088f0)
/usr/local/go/src/pkg/net/http/server.go:1496 +0x163
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.func·002(0x7fa5d41993d8, 0xc2102ebaa0, 0xc2101088f0)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:140 +0x197
net/http.HandlerFunc.ServeHTTP(0xc21030c430, 0x7fa5d41993d8, 0xc2102ebaa0, 0xc2101088f0)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*defaultAPIServer).ServeHTTP(0xc2
E0904 17:55:07.945493 08443 endpoints_controller.go:51] Failed to list services: request [&http.Request{Method:"GET", URL:(*url.URL)(0xc21010e700), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{}, Body:io.ReadCloser(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:"127.0.0.1:8080", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"", RequestURI:"", TLS:(*tls.ConnectionState)(nil)}] failed (500) 500 Internal Server Error: {"kind":"Status","creationTimestamp":null,"apiVersion":"v1beta1","status":"failure","message":"501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]","code":500}
I0904 17:55:17.946028 08443 log.go:134] GET /api/v1beta1/services?labels=: (222.446us) 500
goroutine 25 [running]:
github.com/GoogleCloudPlatform/kubernetes/pkg/httplog.(*respLogger).WriteHeader(0xc2100388a0, 0x1f4)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/httplog/log.go:153 +0x9c
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.writeJSON(0x1f4, 0x7fa5d4188770, 0xc21001fb40, 0x7023a0, 0xc2102c3960, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:157 +0x11f
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.errorJSON(0x7fa5d4199330, 0xc2102e6db0, 0x7fa5d4188770, 0xc21001fb40, 0x7fa5d4199410, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:164 +0x7d
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).handleRESTStorage(0xc2102fa000, 0xc2102ee160, 0x1, 0x1, 0xc210037750, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:79 +0x496
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).ServeHTTP(0xc2102fa000, 0x7fa5d4199410, 0xc2100388a0, 0xc210037750)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:49 +0x280
net/http.func·010(0x7fa5d4199410, 0xc2100388a0, 0xc210037750)
/usr/local/go/src/pkg/net/http/server.go:1252 +0xb0
net/http.HandlerFunc.ServeHTTP(0xc210309840, 0x7fa5d4199410, 0xc2100388a0, 0xc210037750)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
net/http.(*ServeMux).ServeHTTP(0xc2102fa030, 0x7fa5d4199410, 0xc2100388a0, 0xc210037750)
/usr/local/go/src/pkg/net/http/server.go:1496 +0x163
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.func·002(0x7fa5d41993d8, 0xc2102c3780, 0xc210037750)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:140 +0x197
net/http.HandlerFunc.ServeHTTP(0xc21030c430, 0x7fa5d41993d8, 0xc2102c3780, 0xc210037750)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*defaultAPIServer).ServeHTTP(0xc2
E0904 17:55:17.946325 08443 endpoints_controller.go:51] Failed to list services: request [&http.Request{Method:"GET", URL:(*url.URL)(0xc210071a10), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{}, Body:io.ReadCloser(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:"127.0.0.1:8080", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"
", RequestURI:"", TLS:(*tls.ConnectionState)(nil)}] failed (500) 500 Internal Server Error: {"kind":"Status","creationTimestamp":null,"apiVersion":"v1beta1","status":"failure","message":"501: All the given peers are not reach
able (Tried to connect to each peer twice and failed) [0]","code":500}
I0904 17:55:27.947293 08443 log.go:134] GET /api/v1beta1/services?labels=: (327.905us) 500
goroutine 25 [running]:
github.com/GoogleCloudPlatform/kubernetes/pkg/httplog.(*respLogger).WriteHeader(0xc210201000, 0x1f4)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/httplog/log.go:153 +0x9c
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.writeJSON(0x1f4, 0x7fa5d4188770, 0xc21001fb40, 0x7023a0, 0xc2102993c0, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:157 +0x11f
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.errorJSON(0x7fa5d4199330, 0xc2102d3780, 0x7fa5d4188770, 0xc21001fb40, 0x7fa5d4199410, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:164 +0x7d
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).handleRESTStorage(0xc2102fa000, 0xc2102eefb0, 0x1, 0x1, 0xc21028b340, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:79 +0x496
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).ServeHTTP(0xc2102fa000, 0x7fa5d4199410, 0xc210201000, 0xc21028b340)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:49 +0x280
net/http.func·010(0x7fa5d4199410, 0xc210201000, 0xc21028b340)
/usr/local/go/src/pkg/net/http/server.go:1252 +0xb0
net/http.HandlerFunc.ServeHTTP(0xc210309840, 0x7fa5d4199410, 0xc210201000, 0xc21028b340)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
net/http.(*ServeMux).ServeHTTP(0xc2102fa030, 0x7fa5d4199410, 0xc210201000, 0xc21028b340)
/usr/local/go/src/pkg/net/http/server.go:1496 +0x163
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.func·002(0x7fa5d41993d8, 0xc2102991e0, 0xc21028b340)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:140 +0x197
net/http.HandlerFunc.ServeHTTP(0xc21030c430, 0x7fa5d41993d8, 0xc2102991e0, 0xc21028b340)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*defaultAPIServer).ServeHTTP(0xc2
E0904 17:55:27.947560 08443 endpoints_controller.go:51] Failed to list services: request [&http.Request{Method:"GET", URL:(*url.URL)(0xc21000b850), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{}, Body:io.R
eadCloser(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:"127.0.0.1:8080", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"
", RequestURI:"", TLS:(*tls.ConnectionState)(nil)}] failed (500) 500 Internal Server Error: {"kind":"Status","creationTimestamp":null,"apiVersion":"v1beta1","status":"failure","message":"501: All the given peers are not reach
able (Tried to connect to each peer twice and failed) [0]","code":500}
E0904 17:55:37.945823 08443 pod_cache.go:77] Error synchronizing container list: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
I0904 17:55:37.948247 08443 log.go:134] GET /api/v1beta1/services?labels=: (261.546us) 500
goroutine 25 [running]:
github.com/GoogleCloudPlatform/kubernetes/pkg/httplog.(*respLogger).WriteHeader(0xc2101db6c0, 0x1f4)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/httplog/log.go:153 +0x9c
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.writeJSON(0x1f4, 0x7fa5d4188770, 0xc21001fb40, 0x7023a0, 0xc210299aa0, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:157 +0x11f
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.errorJSON(0x7fa5d4199330, 0xc2102c2660, 0x7fa5d4188770, 0xc21001fb40, 0x7fa5d4199410, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:164 +0x7d
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).handleRESTStorage(0xc2102fa000, 0xc2102d5060, 0x1, 0x1, 0xc21028b8f0, ...)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:79 +0x496
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.(*RESTHandler).ServeHTTP(0xc2102fa000, 0x7fa5d4199410, 0xc2101db6c0, 0xc21028b8f0)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/resthandler.go:49 +0x280
net/http.func·010(0x7fa5d4199410, 0xc2101db6c0, 0xc21028b8f0)
/usr/local/go/src/pkg/net/http/server.go:1252 +0xb0
net/http.HandlerFunc.ServeHTTP(0xc210309840, 0x7fa5d4199410, 0xc2101db6c0, 0xc21028b8f0)
/usr/local/go/src/pkg/net/http/server.go:1220 +0x40
net/http.(*ServeMux).ServeHTTP(0xc2102fa030, 0x7fa5d4199410, 0xc2101db6c0, 0xc21028b8f0)
/usr/local/go/src/pkg/net/http/server.go:1496 +0x163
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.func·002(0x7fa5d41993d8, 0xc210299960, 0xc21028b8f0)
/var/src/apiserver/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:140 +0x197
net/http.HandlerFunc.ServeHTTP(0xc21030c430, 0x7fa5d41993d8, 0xc210299960, 0xc21028b8f0)
</code></pre></div> | 0 |
<p dir="auto">This was reported in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1454893304" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/16699" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/16699/hovercard" href="https://github.com/denoland/deno/issues/16699">#16699</a> but while the error is fixed on the canary when using <code class="notranslate">std/http/server.ts</code> it remains when using <code class="notranslate">Deno.serve</code>. Therefore, I am making this issue to separate concerns.</p>
<p dir="auto">Repro:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="await Deno.serve(() => new Response("Hello World!"));"><pre class="notranslate"><span class="pl-k">await</span> <span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">serve</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-k">new</span> <span class="pl-smi">Response</span><span class="pl-kos">(</span><span class="pl-s">"Hello World!"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno run --allow-net --unstable --watch server.ts"><pre class="notranslate"><code class="notranslate">deno run --allow-net --unstable --watch server.ts
</code></pre></div>
<p dir="auto">After making file changes to <code class="notranslate">server.ts</code> and saving it shows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Watcher File change detected! Restarting!
error: Uncaught AddrInUse: Address already in use (os error 98)
Watcher Process finished. Restarting on file change..."><pre class="notranslate"><code class="notranslate">Watcher File change detected! Restarting!
error: Uncaught AddrInUse: Address already in use (os error 98)
Watcher Process finished. Restarting on file change...
</code></pre></div> | <p dir="auto">When running this code</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Deno.serve(() => {}, { port: x })"><pre class="notranslate"><span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">serve</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">port</span>: <span class="pl-s1">x</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">with this command</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno run -A --unstable --watch script.ts"><pre class="notranslate">deno run -A --unstable --watch script.ts</pre></div>
<p dir="auto">I get this error everytime i make a change and have to kill the script (ctrl + c) and run it again.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Watcher File change detected! Restarting!
error: Uncaught (in promise) AddrInUse: Address already in use (os error 98)
Watcher Process finished. Restarting on file change..."><pre class="notranslate"><code class="notranslate">Watcher File change detected! Restarting!
error: Uncaught (in promise) AddrInUse: Address already in use (os error 98)
Watcher Process finished. Restarting on file change...
</code></pre></div>
<p dir="auto">deno 1.26.1 (release, x86_64-unknown-linux-gnu)<br>
Linux Fedora 37</p> | 1 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/apache/shardingsphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response anymore and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">5.0.0-RC1-SNAPSHOT</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-Proxy</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">CREATE TABLE executed correctly.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Either</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mysql> CREATE TABLE `t_encrypt` ( `user_id` bigint DEFAULT NULL, `order_id` bigint DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
ERROR 19999 (C1999): 9Unknown exception: [null]"><pre class="notranslate"><code class="notranslate">mysql> CREATE TABLE `t_encrypt` ( `user_id` bigint DEFAULT NULL, `order_id` bigint DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
ERROR 19999 (C1999): 9Unknown exception: [null]
</code></pre></div>
<p dir="auto">or</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mysql> CREATE TABLE `t_encrypt` (
-> `user_id` bigint DEFAULT NULL,
-> `order_id` bigint DEFAULT NULL,
-> `user_cipher` varchar(100) DEFAULT NULL,
-> `order_cipher` varchar(100) DEFAULT NULL
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
ERROR 19999 (C1999): 9Unknown exception: [null]"><pre class="notranslate"><code class="notranslate">mysql> CREATE TABLE `t_encrypt` (
-> `user_id` bigint DEFAULT NULL,
-> `order_id` bigint DEFAULT NULL,
-> `user_cipher` varchar(100) DEFAULT NULL,
-> `order_cipher` varchar(100) DEFAULT NULL
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
ERROR 19999 (C1999): 9Unknown exception: [null]
</code></pre></div>
<h3 dir="auto">Reason analyze (If you can)</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[INFO ] 2021-03-03 18:23:47.852 [ShardingSphere-Command-2] ShardingSphere-SQL - Logic SQL: CREATE TABLE `t_encrypt` ( `user_id` bigint DEFAULT NULL, `order_id` bigint DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
[INFO ] 2021-03-03 18:23:47.852 [ShardingSphere-Command-2] ShardingSphere-SQL - SQLStatement: MySQLCreateTableStatement(isNotExisted=false)
[INFO ] 2021-03-03 18:23:47.852 [ShardingSphere-Command-2] ShardingSphere-SQL - Actual SQL: dataSource ::: CREATE TABLE `t_encrypt` ( `user_id` bigint DEFAULT NULL, `order_id` bigint DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
[ERROR] 2021-03-03 18:23:47.914 [ShardingSphere-Command-2] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
java.util.NoSuchElementException: null
at java.util.ArrayList$Itr.next(ArrayList.java:862)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:50)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:37)
at org.apache.shardingsphere.infra.metadata.engine.MetadataRefreshEngine.refreshSchema(MetadataRefreshEngine.java:75)
at org.apache.shardingsphere.infra.metadata.engine.MetadataRefreshEngine.refresh(MetadataRefreshEngine.java:64)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.refreshMetadata(DatabaseCommunicationEngine.java:190)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:113)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:101)
at org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.execute(SchemaAssignedDatabaseBackendHandler.java:55)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:57)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:93)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)"><pre class="notranslate"><code class="notranslate">[INFO ] 2021-03-03 18:23:47.852 [ShardingSphere-Command-2] ShardingSphere-SQL - Logic SQL: CREATE TABLE `t_encrypt` ( `user_id` bigint DEFAULT NULL, `order_id` bigint DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
[INFO ] 2021-03-03 18:23:47.852 [ShardingSphere-Command-2] ShardingSphere-SQL - SQLStatement: MySQLCreateTableStatement(isNotExisted=false)
[INFO ] 2021-03-03 18:23:47.852 [ShardingSphere-Command-2] ShardingSphere-SQL - Actual SQL: dataSource ::: CREATE TABLE `t_encrypt` ( `user_id` bigint DEFAULT NULL, `order_id` bigint DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
[ERROR] 2021-03-03 18:23:47.914 [ShardingSphere-Command-2] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
java.util.NoSuchElementException: null
at java.util.ArrayList$Itr.next(ArrayList.java:862)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:50)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:37)
at org.apache.shardingsphere.infra.metadata.engine.MetadataRefreshEngine.refreshSchema(MetadataRefreshEngine.java:75)
at org.apache.shardingsphere.infra.metadata.engine.MetadataRefreshEngine.refresh(MetadataRefreshEngine.java:64)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.refreshMetadata(DatabaseCommunicationEngine.java:190)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:113)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:101)
at org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.execute(SchemaAssignedDatabaseBackendHandler.java:55)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:57)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:93)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
</code></pre></div>
<p dir="auto">And</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[INFO ] 2021-03-03 18:13:11.271 [ShardingSphere-Command-1] ShardingSphere-SQL - Logic SQL: CREATE TABLE `t_encrypt` (
`user_id` bigint DEFAULT NULL,
`order_id` bigint DEFAULT NULL,
`user_cipher` varchar(100) DEFAULT NULL,
`order_cipher` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
[INFO ] 2021-03-03 18:13:11.271 [ShardingSphere-Command-1] ShardingSphere-SQL - SQLStatement: MySQLCreateTableStatement(isNotExisted=false)
[INFO ] 2021-03-03 18:13:11.271 [ShardingSphere-Command-1] ShardingSphere-SQL - Actual SQL: dataSource ::: CREATE TABLE `t_encrypt` (
`user_id` bigint DEFAULT NULL,
`order_id` bigint DEFAULT NULL,
`user_cipher` varchar(100) DEFAULT NULL,
`order_cipher` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
[ERROR] 2021-03-03 18:13:11.383 [ShardingSphere-Command-1] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
java.util.NoSuchElementException: null
at java.util.ArrayList$Itr.next(ArrayList.java:862)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:50)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:37)
at org.apache.shardingsphere.infra.metadata.engine.MetadataRefreshEngine.refreshSchema(MetadataRefreshEngine.java:75)
at org.apache.shardingsphere.infra.metadata.engine.MetadataRefreshEngine.refresh(MetadataRefreshEngine.java:64)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.refreshMetadata(DatabaseCommunicationEngine.java:190)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:113)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:101)
at org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.execute(SchemaAssignedDatabaseBackendHandler.java:55)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:57)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:93)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)"><pre class="notranslate"><code class="notranslate">[INFO ] 2021-03-03 18:13:11.271 [ShardingSphere-Command-1] ShardingSphere-SQL - Logic SQL: CREATE TABLE `t_encrypt` (
`user_id` bigint DEFAULT NULL,
`order_id` bigint DEFAULT NULL,
`user_cipher` varchar(100) DEFAULT NULL,
`order_cipher` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
[INFO ] 2021-03-03 18:13:11.271 [ShardingSphere-Command-1] ShardingSphere-SQL - SQLStatement: MySQLCreateTableStatement(isNotExisted=false)
[INFO ] 2021-03-03 18:13:11.271 [ShardingSphere-Command-1] ShardingSphere-SQL - Actual SQL: dataSource ::: CREATE TABLE `t_encrypt` (
`user_id` bigint DEFAULT NULL,
`order_id` bigint DEFAULT NULL,
`user_cipher` varchar(100) DEFAULT NULL,
`order_cipher` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
[ERROR] 2021-03-03 18:13:11.383 [ShardingSphere-Command-1] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
java.util.NoSuchElementException: null
at java.util.ArrayList$Itr.next(ArrayList.java:862)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:50)
at org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:37)
at org.apache.shardingsphere.infra.metadata.engine.MetadataRefreshEngine.refreshSchema(MetadataRefreshEngine.java:75)
at org.apache.shardingsphere.infra.metadata.engine.MetadataRefreshEngine.refresh(MetadataRefreshEngine.java:64)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.refreshMetadata(DatabaseCommunicationEngine.java:190)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:113)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:101)
at org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.execute(SchemaAssignedDatabaseBackendHandler.java:55)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:57)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:93)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
</code></pre></div>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<p dir="auto">config-encrypt.yaml</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="schemaName: encrypt_db
dataSource:
url: jdbc:mysql://127.0.0.1:3306/demo_ds?serverTimezone=UTC&useSSL=false
username: root
password:
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
rules:
- !ENCRYPT
encryptors:
aes_encryptor:
type: AES
props:
aes-key-value: 123456abc
md5_encryptor:
type: MD5
tables:
t_encrypt:
columns:
user_id:
cipherColumn: user_cipher
encryptorName: md5_encryptor
order_id:
cipherColumn: order_cipher
encryptorName: md5_encryptor"><pre class="notranslate"><code class="notranslate">schemaName: encrypt_db
dataSource:
url: jdbc:mysql://127.0.0.1:3306/demo_ds?serverTimezone=UTC&useSSL=false
username: root
password:
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
rules:
- !ENCRYPT
encryptors:
aes_encryptor:
type: AES
props:
aes-key-value: 123456abc
md5_encryptor:
type: MD5
tables:
t_encrypt:
columns:
user_id:
cipherColumn: user_cipher
encryptorName: md5_encryptor
order_id:
cipherColumn: order_cipher
encryptorName: md5_encryptor
</code></pre></div>
<p dir="auto">server.yaml</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="authentication:
users:
root:
password: root
hostname: '%'
sharding:
password: sharding
props:
max-connections-size-per-query: 1
executor-size: 16 # Infinite by default.
proxy-frontend-flush-threshold: 128 # The default value is 128.
# LOCAL: Proxy will run with LOCAL transaction.
# XA: Proxy will run with XA transaction.
# BASE: Proxy will run with B.A.S.E transaction.
proxy-transaction-type: LOCAL
xa-transaction-manager-type: Atomikos
proxy-opentracing-enabled: false
proxy-hint-enabled: false
query-with-cipher-column: true
sql-show: true
check-table-metadata-enabled: false
lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock"><pre class="notranslate"><code class="notranslate">authentication:
users:
root:
password: root
hostname: '%'
sharding:
password: sharding
props:
max-connections-size-per-query: 1
executor-size: 16 # Infinite by default.
proxy-frontend-flush-threshold: 128 # The default value is 128.
# LOCAL: Proxy will run with LOCAL transaction.
# XA: Proxy will run with XA transaction.
# BASE: Proxy will run with B.A.S.E transaction.
proxy-transaction-type: LOCAL
xa-transaction-manager-type: Atomikos
proxy-opentracing-enabled: false
proxy-hint-enabled: false
query-with-cipher-column: true
sql-show: true
check-table-metadata-enabled: false
lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
</code></pre></div>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> | <p dir="auto">Please answer these questions before submitting your issue. Thanks!<br>
使用DataSourceUtil的编程方式连接数据源</p>
<p dir="auto">`<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/configuration/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/configuration">@configuration</a><br>
@MapperScan("com.knowbox.kms.tiku.dao")<br>
public class MyBatisConfig {</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="private static final String URL_PREFIX = "jdbc:mysql://127.0.0.1:3306/";
private static final String USER_NAME = "test";
private static final String PASSWORD = "test";
@Bean
@Primary
public static SqlSessionFactoryBean createSqlSessionFactoryBean() throws SQLException, IOException {
SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
// 设置mybatis configuration 扫描路径
sqlSessionFactoryBean.setConfigLocation(new ClassPathResource("META-INF/mybatis-config.xml"));
// 添加mapper 扫描路径
PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver();
sqlSessionFactoryBean.setMapperLocations(pathMatchingResourcePatternResolver.getResources(ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + "/META-INF/mapper/*.xml"));
// 设置datasource
DataSource dataSource = getMasterSlaveDataSource();
sqlSessionFactoryBean.setDataSource(dataSource);
return sqlSessionFactoryBean;
}
private static DataSource getMasterSlaveDataSource() throws SQLException {
MasterSlaveRuleConfiguration masterSlaveRuleConfig = new MasterSlaveRuleConfiguration();
masterSlaveRuleConfig.setName("ds_master_slave");
masterSlaveRuleConfig.setMasterDataSourceName("ds_master");
masterSlaveRuleConfig.setSlaveDataSourceNames(Arrays.asList("ds_slave_0", "ds_slave_1"));
return MasterSlaveDataSourceFactory.createDataSource(createDataSourceMap(), masterSlaveRuleConfig, new ConcurrentHashMap<>());
}
private static Map<String, DataSource> createDataSourceMap() {
final Map<String, DataSource> result = new HashMap<>(3, 1);
result.put("ds_master", createDataSource("dev"));
result.put("ds_slave_0", createDataSource("dev"));
result.put("ds_slave_1", createDataSource("dev"));
return result;
}
private static DataSource createDataSource(final String dataSourceName) {
DruidDataSource result = new DruidDataSource();
result.setDriverClassName(com.mysql.jdbc.Driver.class.getName());
result.setUrl(URL_PREFIX + dataSourceName);
result.setUsername(USER_NAME);
result.setPassword(PASSWORD);
return result;
}"><pre class="notranslate"><code class="notranslate">private static final String URL_PREFIX = "jdbc:mysql://127.0.0.1:3306/";
private static final String USER_NAME = "test";
private static final String PASSWORD = "test";
@Bean
@Primary
public static SqlSessionFactoryBean createSqlSessionFactoryBean() throws SQLException, IOException {
SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
// 设置mybatis configuration 扫描路径
sqlSessionFactoryBean.setConfigLocation(new ClassPathResource("META-INF/mybatis-config.xml"));
// 添加mapper 扫描路径
PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver();
sqlSessionFactoryBean.setMapperLocations(pathMatchingResourcePatternResolver.getResources(ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + "/META-INF/mapper/*.xml"));
// 设置datasource
DataSource dataSource = getMasterSlaveDataSource();
sqlSessionFactoryBean.setDataSource(dataSource);
return sqlSessionFactoryBean;
}
private static DataSource getMasterSlaveDataSource() throws SQLException {
MasterSlaveRuleConfiguration masterSlaveRuleConfig = new MasterSlaveRuleConfiguration();
masterSlaveRuleConfig.setName("ds_master_slave");
masterSlaveRuleConfig.setMasterDataSourceName("ds_master");
masterSlaveRuleConfig.setSlaveDataSourceNames(Arrays.asList("ds_slave_0", "ds_slave_1"));
return MasterSlaveDataSourceFactory.createDataSource(createDataSourceMap(), masterSlaveRuleConfig, new ConcurrentHashMap<>());
}
private static Map<String, DataSource> createDataSourceMap() {
final Map<String, DataSource> result = new HashMap<>(3, 1);
result.put("ds_master", createDataSource("dev"));
result.put("ds_slave_0", createDataSource("dev"));
result.put("ds_slave_1", createDataSource("dev"));
return result;
}
private static DataSource createDataSource(final String dataSourceName) {
DruidDataSource result = new DruidDataSource();
result.setDriverClassName(com.mysql.jdbc.Driver.class.getName());
result.setUrl(URL_PREFIX + dataSourceName);
result.setUsername(USER_NAME);
result.setPassword(PASSWORD);
return result;
}
</code></pre></div>
<p dir="auto">`</p>
<h3 dir="auto">Which version of Sharding-Jdbc do you using?(您使用的Sharding-Jdbc版本为?)</h3>
<p dir="auto">sharing jdbc 2.0.3<br>
druid 1.1.9</p>
<h3 dir="auto">Expected behavior (您预期的结果是)</h3>
<h3 dir="auto">Actual behavior (实际运行的结果是)</h3>
<p dir="auto">Caused by: java.lang.NullPointerException: null<br>
at io.shardingjdbc.spring.boot.SpringBootConfiguration.setDataSourceMap(SpringBootConfiguration.java:55) ~[sharding-jdbc-core-spring-boot-starter-2.0.3.jar:na]<br>
at io.shardingjdbc.spring.boot.SpringBootConfiguration.setEnvironment(SpringBootConfiguration.java:49) ~[sharding-jdbc-core-spring-boot-starter-2.0.3.jar:na]<br>
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:106) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]<br>
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:97) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]<br>
... 15 common frames omitted</p> | 0 |
<p dir="auto">There is a lack of warning for incorrectly parsed configurations. In this case I set invalid values for the following configurations in elasticsearch.yml :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# incorrect values because booleans have to be lowercase
node.master: True
node.data: True
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["localhost"]"><pre class="notranslate"><code class="notranslate"># incorrect values because booleans have to be lowercase
node.master: True
node.data: True
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["localhost"]
</code></pre></div>
<p dir="auto">But elastic search starts and I am able to see the following cluster nodes:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl localhost:9200/_nodes/http?pretty=true
{
"cluster_name" : "elasticsearch",
"nodes" : {
...
"attributes" : {
"master" : "True",
"data" : "True"
},
...
},"><pre class="notranslate"><code class="notranslate">curl localhost:9200/_nodes/http?pretty=true
{
"cluster_name" : "elasticsearch",
"nodes" : {
...
"attributes" : {
"master" : "True",
"data" : "True"
},
...
},
</code></pre></div>
<p dir="auto">The only indication when I get that there is a problem is when I try to run other commands to access the data in the cluster. This is the error that I get back when I try to add a mapping to my_index:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -X PUT localhost:9200/my_index -d @mapping.json'
{"error":"MasterNotDiscoveredException[waited for [30s]]","status":503}"><pre class="notranslate"><code class="notranslate">curl -X PUT localhost:9200/my_index -d @mapping.json'
{"error":"MasterNotDiscoveredException[waited for [30s]]","status":503}
</code></pre></div>
<p dir="auto">In this case, it would be useful to fail server start if there is an incorrect parameter or issue some sort of warning or have it logged. I ran this on elasticsearch 1.3.4.</p> | <p dir="auto">Currently there is no way of seeing all settings that are enforced. For instance, defaults are not available and settings from the <code class="notranslate">config/elasticsearch.yml</code> are not available.</p>
<p dir="auto">Any setting which is different from the default should be returned by these APIs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GET /{index}/_settings
GET /_cluster/settings"><pre class="notranslate"><code class="notranslate">GET /{index}/_settings
GET /_cluster/settings
</code></pre></div>
<p dir="auto">Both should also support the <code class="notranslate">include_defaults</code> query string parameter, which would return all settings, including the defaults.</p>
<p dir="auto">Also, deleting a setting should reset the setting to the default.</p>
<p dir="auto">Setting an unknown setting, or a setting that can't be changed should throw an error.</p>
<p dir="auto">Relates to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="26953933" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/5018" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/5018/hovercard" href="https://github.com/elastic/elasticsearch/issues/5018">#5018</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="19340352" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/3670" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/3670/hovercard" href="https://github.com/elastic/elasticsearch/issues/3670">#3670</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11739095" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/2738" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/2738/hovercard" href="https://github.com/elastic/elasticsearch/issues/2738">#2738</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11658370" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/2730" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/2730/hovercard" href="https://github.com/elastic/elasticsearch/issues/2730">#2730</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="18541655" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/3572" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/3572/hovercard" href="https://github.com/elastic/elasticsearch/issues/3572">#3572</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="10724452" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/2628" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/2628/hovercard" href="https://github.com/elastic/elasticsearch/issues/2628">#2628</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="19340512" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/3671" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/3671/hovercard" href="https://github.com/elastic/elasticsearch/issues/3671">#3671</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="26954220" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/5019" data-hovercard-type="pull_request" data-hovercard-url="/elastic/elasticsearch/pull/5019/hovercard" href="https://github.com/elastic/elasticsearch/pull/5019">#5019</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="34296305" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/6309" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/6309/hovercard" href="https://github.com/elastic/elasticsearch/issues/6309">#6309</a></p> | 1 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: "^1.34.0"</li>
<li>Operating System: Windows 11</li>
<li>Browser: Chromium</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" test("Sample visual testing", async ({ page }) => {
await page.goto(`siteurl`, { waitUntil: "domcontentloaded" });
await page.waitForTimeout(10000);
const shot = await page.getByTestId('data-testid-value').screenshot();
expect(shot).toMatchSnapshot("sampletest.png", {maxDiffPixels: 1000});
});"><pre class="notranslate"><code class="notranslate"> test("Sample visual testing", async ({ page }) => {
await page.goto(`siteurl`, { waitUntil: "domcontentloaded" });
await page.waitForTimeout(10000);
const shot = await page.getByTestId('data-testid-value').screenshot();
expect(shot).toMatchSnapshot("sampletest.png", {maxDiffPixels: 1000});
});
</code></pre></div>
<p dir="auto">PLease run provided test method with any of the sample test you have (website)</p>
<p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p>
<p dir="auto">[https://github.com/your_profile/playwright_issue_title]</p>
<p dir="auto">or</p>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], },
},
});"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span><span class="pl-kos"></span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>[Run the test]</li>
<li>[...]</li>
</ul>
<p dir="auto"><strong>Expected</strong><br>
It should take a screenshot of specific element located by locator and match it with existing screenshot<br>
<strong>Actual</strong><br>
Screenshot() method is not taking any screenshot as it gets stuck and doesn't move to next step.</p> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: 1.30.0</li>
<li>Operating System: Linux (Ubuntu 22.10)</li>
<li>Node.js version: 14.21.3</li>
<li>Visual Studio Code version: 1.76.2</li>
<li>Playwright for VSCode extension version: 1.0.9</li>
<li>Browser: Chromium</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<p dir="auto">Here is a minimal reproducible example :</p>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';
const config: PlaywrightTestConfig = {
/* Configure projects for major browsers */
projects: [
{
name: 'Desktop Chrome',
use: {
...devices['Desktop Chrome']
}
}
]
};
export default config;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-k">type</span> <span class="pl-kos">{</span> <span class="pl-smi">PlaywrightTestConfig</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">config</span>: <span class="pl-smi">PlaywrightTestConfig</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c">/* Configure projects for major browsers */</span>
<span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'Desktop Chrome'</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span>
...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">config</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Test file (self-contained)</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { test as base, expect } from '@playwright/test';
const keywords = ['foo', 'bar', 'playwright'];
const test = base.extend<{ keyword: string }>({
keyword: 'foo'
});
test.describe(`Test suite`, () => {
for (const kw of keywords) {
test.use({ keyword: kw });
test(`Test for : ${kw}`, async ({ keyword }) => {
await expect(kw).toBe(keyword);
});
}
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span> <span class="pl-k">as</span> <span class="pl-s1">base</span><span class="pl-kos">,</span> <span class="pl-s1">expect</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">keywords</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-s">'bar'</span><span class="pl-kos">,</span> <span class="pl-s">'playwright'</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">test</span> <span class="pl-c1">=</span> <span class="pl-s1">base</span><span class="pl-kos">.</span><span class="pl-en">extend</span><span class="pl-kos"><</span><span class="pl-kos">{</span> <span class="pl-c1">keyword</span>: <span class="pl-smi">string</span> <span class="pl-kos">}</span><span class="pl-kos">></span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">keyword</span>: <span class="pl-s">'foo'</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">describe</span><span class="pl-kos">(</span><span class="pl-s">`Test suite`</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">const</span> <span class="pl-s1">kw</span> <span class="pl-k">of</span> <span class="pl-s1">keywords</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">keyword</span>: <span class="pl-s1">kw</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">`Test for : <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">kw</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> keyword <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">kw</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBe</span><span class="pl-kos">(</span><span class="pl-s1">keyword</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>Run the test suite</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">Expect to have the fixture correctly set for each test inside the for loop.</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">When I run this test suite, the first two tests fail and the last one succeeds. For all of them <code class="notranslate">keyword</code> fixture is equal to <code class="notranslate">playwright</code>. Here is the resulting log :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Running 3 tests using 1 worker
1) [Desktop Chrome] › specs/simpler-test.spec.ts:12:9 › Test suite › Test for : foo ==============
Error: expect(received).toBe(expected) // Object.is equality
Expected: "playwright"
Received: "foo"
11 | test.use({ keyword: kw });
12 | test(`Test for : ${kw}`, async ({ keyword }) => {
> 13 | await expect(kw).toBe(keyword);
| ^
14 | });
15 | }
16 | });
2) [Desktop Chrome] › specs/simpler-test.spec.ts:12:9 › Test suite › Test for : bar ==============
Error: expect(received).toBe(expected) // Object.is equality
Expected: "playwright"
Received: "bar"
11 | test.use({ keyword: kw });
12 | test(`Test for : ${kw}`, async ({ keyword }) => {
> 13 | await expect(kw).toBe(keyword);
| ^
14 | });
15 | }
16 | });
2 failed
[Desktop Chrome] › specs/simpler-test.spec.ts:12:9 › Test suite › Test for : foo ===============
[Desktop Chrome] › specs/simpler-test.spec.ts:12:9 › Test suite › Test for : bar ===============
1 passed (1.5s)"><pre class="notranslate"><code class="notranslate">Running 3 tests using 1 worker
1) [Desktop Chrome] › specs/simpler-test.spec.ts:12:9 › Test suite › Test for : foo ==============
Error: expect(received).toBe(expected) // Object.is equality
Expected: "playwright"
Received: "foo"
11 | test.use({ keyword: kw });
12 | test(`Test for : ${kw}`, async ({ keyword }) => {
> 13 | await expect(kw).toBe(keyword);
| ^
14 | });
15 | }
16 | });
2) [Desktop Chrome] › specs/simpler-test.spec.ts:12:9 › Test suite › Test for : bar ==============
Error: expect(received).toBe(expected) // Object.is equality
Expected: "playwright"
Received: "bar"
11 | test.use({ keyword: kw });
12 | test(`Test for : ${kw}`, async ({ keyword }) => {
> 13 | await expect(kw).toBe(keyword);
| ^
14 | });
15 | }
16 | });
2 failed
[Desktop Chrome] › specs/simpler-test.spec.ts:12:9 › Test suite › Test for : foo ===============
[Desktop Chrome] › specs/simpler-test.spec.ts:12:9 › Test suite › Test for : bar ===============
1 passed (1.5s)
</code></pre></div>
<p dir="auto"><strong>Notes</strong></p>
<p dir="auto">My actual use case has a page object used as a fixture, depending on a "constant fixture" that is updated in a for loop with <code class="notranslate">test.use</code>. Also I use the constant fixture to pick various values from a test data set. If there is another way to achieve this than a for loop and <code class="notranslate">test.use</code>, glad to switch to it.</p> | 0 |
<p dir="auto"><strong>Describe the bug</strong><br>
SQLAlchemy (on the latest master version) does not place correct parenthesis when using the <code class="notranslate">||</code> operator.</p>
<p dir="auto"><strong>Expected behavior</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="expr = type_coerce(Author.id + literal(1), types.String)
f = (Author.first_name + expr).label('f')
session.query(f).select_from(Author)"><pre class="notranslate"><span class="pl-s1">expr</span> <span class="pl-c1">=</span> <span class="pl-en">type_coerce</span>(<span class="pl-v">Author</span>.<span class="pl-s1">id</span> <span class="pl-c1">+</span> <span class="pl-en">literal</span>(<span class="pl-c1">1</span>), <span class="pl-s1">types</span>.<span class="pl-v">String</span>)
<span class="pl-s1">f</span> <span class="pl-c1">=</span> (<span class="pl-v">Author</span>.<span class="pl-s1">first_name</span> <span class="pl-c1">+</span> <span class="pl-s1">expr</span>).<span class="pl-en">label</span>(<span class="pl-s">'f'</span>)
<span class="pl-s1">session</span>.<span class="pl-en">query</span>(<span class="pl-s1">f</span>).<span class="pl-en">select_from</span>(<span class="pl-v">Author</span>)</pre></div>
<p dir="auto">I expect the following query:</p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="SELECT author.first_name || (author.id + ?) AS f
FROM author"><pre class="notranslate"><span class="pl-k">SELECT</span> <span class="pl-c1">author</span>.<span class="pl-c1">first_name</span> <span class="pl-k">||</span> (<span class="pl-c1">author</span>.<span class="pl-c1">id</span> <span class="pl-k">+</span> ?) <span class="pl-k">AS</span> f
<span class="pl-k">FROM</span> author</pre></div>
<p dir="auto">Producing:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Name1
Name2
..."><pre class="notranslate"><code class="notranslate">Name1
Name2
...
</code></pre></div>
<p dir="auto">Instead SQLAlchemy generate the following query:</p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="SELECT author.first_name || author.id + ? AS f
FROM author"><pre class="notranslate"><span class="pl-k">SELECT</span> <span class="pl-c1">author</span>.<span class="pl-c1">first_name</span> <span class="pl-k">||</span> <span class="pl-c1">author</span>.<span class="pl-c1">id</span> <span class="pl-k">+</span> ? <span class="pl-k">AS</span> f
<span class="pl-k">FROM</span> author</pre></div>
<p dir="auto">Leading to incorrect results:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1
1
..."><pre class="notranslate"><code class="notranslate">1
1
...
</code></pre></div>
<p dir="auto">Unlike the SQL operator <code class="notranslate">+</code>, the operator <code class="notranslate">||</code> has the highest precedence.<br>
Therefore to interpret this query correctly parenthesis are needed.<br>
For more details see <a href="https://www.sqlite.org/lang_expr.html#operators" rel="nofollow">here</a></p>
<p dir="auto"><strong>Versions.</strong><br>
SQLAlchemy latest master version(<a href="https://github.com/sqlalchemy/sqlalchemy/commit/3b2c6692bd5df6fe4a37192dfdaed408e3be5e54">commit</a>)</p>
<p dir="auto"><strong>Have a nice day!</strong></p> | <p dir="auto"><strong>Describe the bug</strong></p>
<p dir="auto">It seems to me that <code class="notranslate">sqlalchemy</code> does not wrap an SQL expression with brackets when the function <code class="notranslate">type_coerce()</code> is used.</p>
<p dir="auto">I have the following query</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="mulExpr = type_coerce((Model.a * Model.b), types.Float).label('mulExpr')
divExpr = (Model.c / mulExpr).label('divExpr')
session.query(divExpr, mulExpr).select_from(Model)"><pre class="notranslate"><span class="pl-s1">mulExpr</span> <span class="pl-c1">=</span> <span class="pl-en">type_coerce</span>((<span class="pl-v">Model</span>.<span class="pl-s1">a</span> <span class="pl-c1">*</span> <span class="pl-v">Model</span>.<span class="pl-s1">b</span>), <span class="pl-s1">types</span>.<span class="pl-v">Float</span>).<span class="pl-en">label</span>(<span class="pl-s">'mulExpr'</span>)
<span class="pl-s1">divExpr</span> <span class="pl-c1">=</span> (<span class="pl-v">Model</span>.<span class="pl-s1">c</span> <span class="pl-c1">/</span> <span class="pl-s1">mulExpr</span>).<span class="pl-en">label</span>(<span class="pl-s">'divExpr'</span>)
<span class="pl-s1">session</span>.<span class="pl-en">query</span>(<span class="pl-s1">divExpr</span>, <span class="pl-s1">mulExpr</span>).<span class="pl-en">select_from</span>(<span class="pl-v">Model</span>)</pre></div>
<p dir="auto">The code generates the following SQL query when I ran it on <code class="notranslate">sqlite</code>.</p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="SELECT Model.c / Model.a * Model.b AS "divExpr", Model.a * Model.b AS "mulExpr"
FROM listing"><pre class="notranslate"><span class="pl-k">SELECT</span> <span class="pl-c1">Model</span>.<span class="pl-c1">c</span> <span class="pl-k">/</span> <span class="pl-c1">Model</span>.<span class="pl-c1">a</span> <span class="pl-k">*</span> <span class="pl-c1">Model</span>.<span class="pl-c1">b</span> <span class="pl-k">AS</span> <span class="pl-s"><span class="pl-pds">"</span>divExpr<span class="pl-pds">"</span></span>, <span class="pl-c1">Model</span>.<span class="pl-c1">a</span> <span class="pl-k">*</span> <span class="pl-c1">Model</span>.<span class="pl-c1">b</span> <span class="pl-k">AS</span> <span class="pl-s"><span class="pl-pds">"</span>mulExpr<span class="pl-pds">"</span></span>
<span class="pl-k">FROM</span> listing</pre></div>
<p dir="auto">However, I would expect the following query instead where the sub-expression <code class="notranslate">Model.a * Model.b</code> is wrapped by brackets.</p>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="SELECT Model.c / (Model.a * Model.b) AS "divExpr", Model.a * Model.b AS "mulExpr"
FROM listing"><pre class="notranslate"><span class="pl-k">SELECT</span> <span class="pl-c1">Model</span>.<span class="pl-c1">c</span> <span class="pl-k">/</span> (<span class="pl-c1">Model</span>.<span class="pl-c1">a</span> <span class="pl-k">*</span> <span class="pl-c1">Model</span>.<span class="pl-c1">b</span>) <span class="pl-k">AS</span> <span class="pl-s"><span class="pl-pds">"</span>divExpr<span class="pl-pds">"</span></span>, <span class="pl-c1">Model</span>.<span class="pl-c1">a</span> <span class="pl-k">*</span> <span class="pl-c1">Model</span>.<span class="pl-c1">b</span> <span class="pl-k">AS</span> <span class="pl-s"><span class="pl-pds">"</span>mulExpr<span class="pl-pds">"</span></span>
<span class="pl-k">FROM</span> listing</pre></div>
<p dir="auto">Note that this issue only occurs when the function <code class="notranslate">type_coerce()</code> is applied to the sub-expression.</p>
<p dir="auto"><strong>Have a nice day!</strong></p> | 1 |
<p dir="auto">There is no option to modify the default drawer width in the drawer properties. There is a work around(edit the main file) but it fails on certain screen options. Is there any optimum solution for all screen types.</p> | <p dir="auto">When I open the keyboard in an alertdialog the keyboard overlaps the dialog which is pretty inconvenient as the user can't even see what he is typing.</p> | 0 |
<p dir="auto">If I add the latest version of <strong>rx.TypeScript.DefinitelyTyped</strong> to a new TypeScript project, it doesn't build. I get the following errors:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" C:\Development\Projects\TypeScriptTestApp\TypeScriptTestApp\Scripts\typings\rx\rx.lite.d.ts(14,15): error TS2000: Build: Duplicate identifier 'Scheduler'. Additional locations:
C:\Development\Projects\TypeScriptTestApp\TypeScriptTestApp\Scripts\typings\rx\rx.lite.d.ts(14,15): error TS2137: Build: Class Scheduler declares interface IScheduler but does not implement it:
C:\Development\Projects\TypeScriptTestApp\TypeScriptTestApp\Scripts\typings\rx\rx.virtualtime.d.ts(10,79): error TS2186: Build: Type name 'Scheduler' in extends clause does not reference constructor function for 'Scheduler'."><pre class="notranslate"><code class="notranslate"> C:\Development\Projects\TypeScriptTestApp\TypeScriptTestApp\Scripts\typings\rx\rx.lite.d.ts(14,15): error TS2000: Build: Duplicate identifier 'Scheduler'. Additional locations:
C:\Development\Projects\TypeScriptTestApp\TypeScriptTestApp\Scripts\typings\rx\rx.lite.d.ts(14,15): error TS2137: Build: Class Scheduler declares interface IScheduler but does not implement it:
C:\Development\Projects\TypeScriptTestApp\TypeScriptTestApp\Scripts\typings\rx\rx.virtualtime.d.ts(10,79): error TS2186: Build: Type name 'Scheduler' in extends clause does not reference constructor function for 'Scheduler'.
</code></pre></div>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Igorbek/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Igorbek">@Igorbek</a> / <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/carldebilly/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/carldebilly">@carldebilly</a> any comments?</p> | <p dir="auto">could you please let me know if, there is any existing issues on the below scenario. Else i feel this is something to do with the latest release with @types/express</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I tried using the <code class="notranslate">@types/express: 4.17.5</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I tried reverting to <code class="notranslate">@types/express: 4.17.0</code> package and find no problems.</li>
</ul>
<p dir="auto">The latest version problems are as follows</p>
<ol dir="auto">
<li>Sometimes i get as Property 'query' does not exist on type 'Request<ParamsDictionary, any, any, any>'[ <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="517438876" data-permission-text="Title is private" data-url="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/40138" data-hovercard-type="issue" data-hovercard-url="/DefinitelyTyped/DefinitelyTyped/issues/40138/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/40138">#40138</a>]</li>
<li>some times i get the issue as<br>
error TS2345: Argument of type 'string | string[] | Query | Query[]' is not assignable to parameter of type 'string'. Type 'string[]' is not assignable to type 'string'. when i use as 'req.query.xxxx'</li>
</ol> | 0 |
<p dir="auto">Hi, could you update this dependency on the new version?</p>
<p dir="auto">Moderate Prototype Pollution<br>
Package minimist<br>
Patched in >=1.2.3<br>
Dependency of webpack-dev-server [dev]<br>
Path webpack-dev-server > chokidar > fsevents > node-pre-gyp > tar > mkdirp > minimist<br>
More info <a href="https://npmjs.com/advisories/1179" rel="nofollow">https://npmjs.com/advisories/1179</a></p>
<p dir="auto">Moderate Prototype Pollution<br>
Package minimist<br>
Patched in >=1.2.3<br>
Dependency of webpack [dev]<br>
Path webpack > watchpack > chokidar > fsevents > node-pre-gyp > rc > minimist<br>
More info <a href="https://npmjs.com/advisories/1179" rel="nofollow">https://npmjs.com/advisories/1179</a></p> | <h1 dir="auto">Bug report</h1>
<p dir="auto">webpack currently depends on the old 0.5.1 version of "mkdirp" which depends on old vulnerable minimist package. The 0.5.x line of mkdirp from the original author is not developed any further and maintenance of this package was taken over by isaacs with the new 1.x versions.</p>
<p dir="auto">see: <a href="https://github.com/substack/node-mkdirp/issues/166">https://github.com/substack/node-mkdirp/issues/166</a><br>
CVE: <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7598" rel="nofollow">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7598</a></p>
<p dir="auto">Please update "mkdirp" dependency to the latest 1.x version to fix this vulnerability.<br>
.<br>
<strong>What is the current behavior?</strong></p>
<p dir="auto">old "mkdirp" 0.5.1 fetches dependend package "minimist" 0.0.8 which triggers warning in security checkers blocking new builds.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">Update dependency "mkdirp" to latest version 1.0.3 which has dropped dependency of "minimist" and does not trigger any security warnings anymore.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 4.42.0<br>
Node.js version: 10.16<br>
Operating System: linux<br>
Additional tools:</p> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=cbeams" rel="nofollow">Chris Beams</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3879?redirect=false" rel="nofollow">SPR-3879</a></strong> and commented</p>
<p dir="auto">Disclaimer: This may actually be an AspectJ bug. I can't tell at this point.</p>
<p dir="auto">The problem behavior I'm seeing is a bit hard to describe in prose; the best bet is to take a look at the code, beans xml and attached log output.</p>
<p dir="auto">Essentially, it looks like AspectJ pointcut expressions aren't recognizing methods that override method declarations that take generic parameters.</p>
<p dir="auto">For example, if I have a class MySet that implements Set<String>, an AspectJ pointcut expression of "execution(* MySet.*(..))" will NOT properly match MySet.add(String str). Again, this doesn't express very well in prose, so take a look at the code (I've made it as concise as possible) and see what you can make of it. I do have a workaround, which is detailed at the bottom of the issue.</p>
<p dir="auto">If necessary, I'd be happy to upload a complete testcase. If there are guidelines for testcase submission, please comment on this issue with a link to that documentation and I'll follow it.</p>
<p dir="auto">Consider the following interfaces and implementation:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public interface Repository<T> extends Set<T> {}
public interface ProductRepository extends Repository<Product> {
Set<Product> findByCategory(String category);
}
public class JdoProductRepositoryImpl extends AbstractSet<Product> implements ProductRepository {
private final PersistenceManagerFactory pmf;
public JdoProductRepositoryImpl(PersistenceManagerFactory pmf) {
this.pmf = pmf;
}
@Override
public boolean add(Product product) {
PersistenceManager pm = pmf.getPersistenceManager();
boolean isNew = !(JDOHelper.isPersistent(product) || JDOHelper.isDetached(product));
pm.makePersistent(product);
return isNew;
}
// clear(), size(), iterator(), findByCategory() methods omitted for brevity
}"><pre class="notranslate"><code class="notranslate">public interface Repository<T> extends Set<T> {}
public interface ProductRepository extends Repository<Product> {
Set<Product> findByCategory(String category);
}
public class JdoProductRepositoryImpl extends AbstractSet<Product> implements ProductRepository {
private final PersistenceManagerFactory pmf;
public JdoProductRepositoryImpl(PersistenceManagerFactory pmf) {
this.pmf = pmf;
}
@Override
public boolean add(Product product) {
PersistenceManager pm = pmf.getPersistenceManager();
boolean isNew = !(JDOHelper.isPersistent(product) || JDOHelper.isDetached(product));
pm.makePersistent(product);
return isNew;
}
// clear(), size(), iterator(), findByCategory() methods omitted for brevity
}
</code></pre></div>
<p dir="auto">beans.xml:</p>
<p dir="auto"><beans><br>
<bean<br>
id="pmf"<br>
class="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean"<br>
p:config-location="classpath:jpox.properties"/></p>
<p dir="auto"><bean id="pmfProxy"<br>
class="org.springframework.orm.jdo.TransactionAwarePersistenceManagerFactoryProxy"<br>
p:target-persistence-manager-factory-ref="pmf"<br>
p:allow-create="true"/></p>
<p dir="auto"><bean id="productRepos" class="demo.product.JdoProductRepositoryImpl"><br>
<constructor-arg ref="pmfProxy"/><br>
</bean></p>
<p dir="auto"><bean id="txnManager"<br>
class="org.springframework.orm.jdo.JdoTransactionManager"<br>
p:persistence-manager-factory-ref="pmf"/></p>
<p dir="auto"><tx:advice id="txnAdvice" transaction-manager="txnManager"><br>
tx:attributes<br>
<tx:method name="clear" propagation="REQUIRED" read-only="true"/><br>
<tx:method name="size" propagation="REQUIRED" read-only="true"/><br>
<tx:method name="find*" propagation="REQUIRED" read-only="true"/><br>
<tx:method name="add" propagation="REQUIRED" read-only="false"/><br>
</tx:attributes><br>
</tx:advice></p>
<p dir="auto">aop:config<br>
<aop:advisor advice-ref="txnAdvice" pointcut="execution(* demo.product.Repository+.*(..))"/><br>
</aop:config><br>
</beans></p>
<p dir="auto">main method:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public static void main(String... args) {
ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
ProductRepository productRepos = (ProductRepository) ctx.getBean("productRepos");
int size;
productRepos.clear();
size = productRepos.size();
logger.info("size before add: " + size);
assert size == 0;
Product product = new Product("foo");
productRepos.add(product); // <-- throws here with the stack trace below
size = productRepos.size();
logger.info("size after add: " + size);
assert size == 1;
logger.info("products with category 'foo': "
+ productRepos.findByCategory("foo").size());
logger.info("products with category 'bar': "
+ productRepos.findByCategory("bar").size());
}"><pre class="notranslate"><code class="notranslate">public static void main(String... args) {
ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
ProductRepository productRepos = (ProductRepository) ctx.getBean("productRepos");
int size;
productRepos.clear();
size = productRepos.size();
logger.info("size before add: " + size);
assert size == 0;
Product product = new Product("foo");
productRepos.add(product); // <-- throws here with the stack trace below
size = productRepos.size();
logger.info("size after add: " + size);
assert size == 1;
logger.info("products with category 'foo': "
+ productRepos.findByCategory("foo").size());
logger.info("products with category 'bar': "
+ productRepos.findByCategory("bar").size());
}
</code></pre></div>
<p dir="auto">Stack trace:<br>
Exception in thread "main" org.jpox.jdo.exceptions.TransactionNotActiveException: Transaction is not active. You either need to define a transaction around this, or run your PersistenceManagerFactory with 'NontransactionalRead' and 'NontransactionalWrite' set to 'true'<br>
at org.jpox.AbstractPersistenceManager.assertWritable(AbstractPersistenceManager.java:1959)<br>
at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:607)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:585)<br>
at org.springframework.orm.jdo.TransactionAwarePersistenceManagerFactoryProxy$TransactionAwareInvocationHandler.invoke(TransactionAwarePersistenceManagerFactoryProxy.java:212)<br>
at $Proxy2.makePersistent(Unknown Source)<br>
at demo.product.JdoProductRepositoryImpl.add(JdoProductRepositoryImpl.java:38)<br>
at demo.product.JdoProductRepositoryImpl.add(JdoProductRepositoryImpl.java:1)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:585)<br>
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)<br>
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)<br>
at $Proxy1.add(Unknown Source)<br>
at demo.app.Main.main(Main.java:33)</p>
<p dir="auto">So, as you'll see in the attached log output, a transaction is opened and closed just fine for the calls to clear() and to size(), but not for the call to add(product). This appears to be because add(product) is not getting advised by AspectJ whatsoever.</p>
<p dir="auto">I have found a simple workaround (that makes this issue feel all the more like a bug to me):</p>
<p dir="auto">If I explicitly declare an add(Product) method in the ProductRepository interface as follows, the call to add(product) works just fine (i.e.: a transaction is opened and closed appropriately):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public interface ProductRepository extends Repository<Product> {
void add(Product product);
Set<Product> findByCategory(String category);
}"><pre class="notranslate"><code class="notranslate">public interface ProductRepository extends Repository<Product> {
void add(Product product);
Set<Product> findByCategory(String category);
}
</code></pre></div>
<p dir="auto">See the log.workaround.txt file for full output when this fix is in place.</p>
<p dir="auto">I've also attached my jpox.properties file for further clarity.</p>
<p dir="auto">Hopefully this is just an error on my part in understanding AspectJ pointcut syntax (or something else trivial).</p>
<p dir="auto">Again, I'd be happy to put together a more complete testcase if that helps, and/or answer any additional questions.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.6</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/12909/jpox.properties" rel="nofollow">jpox.properties</a> (<em>682 bytes</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/12907/log.txt" rel="nofollow">log.txt</a> (<em>9.08 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/12908/log.workaround.txt" rel="nofollow">log.workaround.txt</a> (<em>18.78 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398078567" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8239" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8239/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8239">#8239</a> Spring AOP doesn't process generics correctly (<em><strong>"duplicates"</strong></em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=astefan" rel="nofollow">Andrei Stefan</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3556?redirect=false" rel="nofollow">SPR-3556</a></strong> and commented</p>
<p dir="auto">I made two tests:</p>
<ul dir="auto">
<li>one with AspectJ support;</li>
<li>one with Spring's AspectJ support.</li>
</ul>
<p dir="auto">The tests involve two interfaces: Base<T> and DerivedInterface<T> extends Base<T>.<br>
A Before pointcut matching all methods from Base and DerivedInterface is defined: <code class="notranslate">@Before</code>("execution(* example.Base+.*(..))")<br>
In AspectJ a test creating an instance of a class implementing DerivedInterface: DerivedInterface<String> obj = new DerivedString(); and then calling methods on both interfaces demonstrates advice being applied on both methods.<br>
The same test in Spring getting a bean instance from ApplicationContext like DerivedInterface<String> bean = (DerivedInterface<String>) context.getBean("myBean"); and calling methods on both interfaces, the advice is not applied to methods receiving as parameter the generic type <T>.</p>
<p dir="auto">Methods like method(<T>) don't get the advice applied, but method2() have the advice applied.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.5, 2.1 M3</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/12641/SpringAspectJ.zip" rel="nofollow">SpringAspectJ.zip</a> (<em>1.86 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398079012" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8309" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8309/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8309">#8309</a> Spring AOP <code class="notranslate">@Aspect</code> pointcut ignores generic type params and matches to many join points (<em><strong>"is depended on by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398080881" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8559" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8559/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8559">#8559</a> AspectJ pointcut expressions fail to match generically parameterized methods (<em><strong>"is duplicated by"</strong></em>)</li>
</ul> | 1 |
<p dir="auto">I am testing out the v1.1.0 tag and built a hyperkube binary. However, running it with no arguments is producing:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_output/local/go/bin/hyperkube
W0930 17:57:47.051620 714 server.go:176] Failed to start in resource-only container "/kube-proxy": mkdir /sys/fs/cgroup/perf_event/kube-proxy: read-only file system
W0930 17:57:47.051962 714 server.go:185] Neither --kubeconfig nor --master was specified. Using default API client. This might not work.
W0930 17:57:47.053839 714 iptables.go:140] Error checking iptables version, assuming version at least 1.4.11: exec: "iptables": executable file not found in $PATH
E0930 17:57:47.054589 714 server.go:331] Not trying iptables proxy: can't get Node "507aa6445e16": Get http://localhost:8080/api/v1/nodes/507aa6445e16: dial tcp 127.0.0.1:8080: connection refused
F0930 17:57:47.055092 714 server.go:246] Unable to create proxier: failed to initialize iptables: error creating chain "KUBE-PORTALS-CONTAINER": exec: "iptables": executable file not found in $PATH: "><pre class="notranslate"><code class="notranslate">_output/local/go/bin/hyperkube
W0930 17:57:47.051620 714 server.go:176] Failed to start in resource-only container "/kube-proxy": mkdir /sys/fs/cgroup/perf_event/kube-proxy: read-only file system
W0930 17:57:47.051962 714 server.go:185] Neither --kubeconfig nor --master was specified. Using default API client. This might not work.
W0930 17:57:47.053839 714 iptables.go:140] Error checking iptables version, assuming version at least 1.4.11: exec: "iptables": executable file not found in $PATH
E0930 17:57:47.054589 714 server.go:331] Not trying iptables proxy: can't get Node "507aa6445e16": Get http://localhost:8080/api/v1/nodes/507aa6445e16: dial tcp 127.0.0.1:8080: connection refused
F0930 17:57:47.055092 714 server.go:246] Unable to create proxier: failed to initialize iptables: error creating chain "KUBE-PORTALS-CONTAINER": exec: "iptables": executable file not found in $PATH:
</code></pre></div>
<p dir="auto">I would have expected a usage message. None of the servers are working correctly. After doing some more digging I found that when adding the proxy server to <code class="notranslate">hk</code> is causing it to essentially boot up breaking hyperkube.</p>
<p dir="auto">See <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/kubernetes/kubernetes/commit/1c25c2cd9954d2985d115e3dc876918222aff7db/hovercard" href="https://github.com/kubernetes/kubernetes/commit/1c25c2cd9954d2985d115e3dc876918222aff7db"><tt>1c25c2c</tt></a></p> | <p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p> | 0 |
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sshleifer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sshleifer">@sshleifer</a> - sorry to ping you here on this. Would be amazing if you find some time to explain the Pegasus tokenizer a bit.</p>
<p dir="auto">A couple of things I don't understand:</p>
<ul dir="auto">
<li>In the official Pegasus Tokenizer and from reading the paper it seems that exactly 2 mask tokens are necessary.<br>
See <a href="https://github.com/google-research/pegasus/blob/master/pegasus/ops/pretrain_parsing_ops.cc#L66">https://github.com/google-research/pegasus/blob/master/pegasus/ops/pretrain_parsing_ops.cc#L66</a><br>
a) ID=2 seems to correspond to the sentence mask token, called <code class="notranslate">[MASK_1]</code> and<br>
b) ID=3 seems to correspond to the word mask token, called <code class="notranslate">[MASK_2]</code></li>
</ul>
<p dir="auto">=> Why don't we have <code class="notranslate">[MASK_1]</code> and <code class="notranslate">[MASK_2]</code> tokens in the tokenizer's special tokens? I would actually add them at the id's 2 and 3 instead of having <code class="notranslate">unk_2</code> and <code class="notranslate">unk_3</code> there. Wdyt?</p>
<ul dir="auto">
<li>
<p dir="auto">Why do we call the tokens unk_2 - unk_104 ? Why unk? And why aren't those part of the <code class="notranslate">special_tokens_map</code> - is this on purpose?</p>
</li>
<li>
<p dir="auto">Why does Pegasus inherit from the Reformer Tokenizer -> I don't really see what they have in common...</p>
</li>
</ul>
<p dir="auto">Would be awesome if you could take 10min to reply :-)</p> | <h1 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> Feature request</h1>
<p dir="auto"><strong>There should be indexes in the output of the grouped entity NER pipeline</strong></p>
<p dir="auto">The standard NER pipeline from transformers outputs entities that contain the word, score, entity type, and index. The following snippet demonstrates the normal behavior of the NER pipeline with the default <code class="notranslate">grouped_entities=False</code> option.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from transformers import pipeline
nlp_without_grouping = pipeline("ner")
sequence = "Hugging Face Inc. is a company based in New York City."
print(nlp_without_grouping(sequence))
[
{'word': 'Hu', 'score': 0.9992662668228149, 'entity': 'I-ORG', 'index': 1},
{'word': '##gging', 'score': 0.9808881878852844, 'entity': 'I-ORG', 'index': 2},
{'word': 'Face', 'score': 0.9953625202178955, 'entity': 'I-ORG', 'index': 3},
{'word': 'Inc', 'score': 0.9993382096290588, 'entity': 'I-ORG', 'index': 4},
{'word': 'New', 'score': 0.9990268349647522, 'entity': 'I-LOC', 'index': 11},
{'word': 'York', 'score': 0.9988483190536499, 'entity': 'I-LOC', 'index': 12},
{'word': 'City', 'score': 0.9991773366928101, 'entity': 'I-LOC', 'index': 13}
]
"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">transformers</span> <span class="pl-k">import</span> <span class="pl-s1">pipeline</span>
<span class="pl-s1">nlp_without_grouping</span> <span class="pl-c1">=</span> <span class="pl-en">pipeline</span>(<span class="pl-s">"ner"</span>)
<span class="pl-s1">sequence</span> <span class="pl-c1">=</span> <span class="pl-s">"Hugging Face Inc. is a company based in New York City."</span>
<span class="pl-en">print</span>(<span class="pl-en">nlp_without_grouping</span>(<span class="pl-s1">sequence</span>))
[
{<span class="pl-s">'word'</span>: <span class="pl-s">'Hu'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.9992662668228149</span>, <span class="pl-s">'entity'</span>: <span class="pl-s">'I-ORG'</span>, <span class="pl-s">'index'</span>: <span class="pl-c1">1</span>},
{<span class="pl-s">'word'</span>: <span class="pl-s">'##gging'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.9808881878852844</span>, <span class="pl-s">'entity'</span>: <span class="pl-s">'I-ORG'</span>, <span class="pl-s">'index'</span>: <span class="pl-c1">2</span>},
{<span class="pl-s">'word'</span>: <span class="pl-s">'Face'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.9953625202178955</span>, <span class="pl-s">'entity'</span>: <span class="pl-s">'I-ORG'</span>, <span class="pl-s">'index'</span>: <span class="pl-c1">3</span>},
{<span class="pl-s">'word'</span>: <span class="pl-s">'Inc'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.9993382096290588</span>, <span class="pl-s">'entity'</span>: <span class="pl-s">'I-ORG'</span>, <span class="pl-s">'index'</span>: <span class="pl-c1">4</span>},
{<span class="pl-s">'word'</span>: <span class="pl-s">'New'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.9990268349647522</span>, <span class="pl-s">'entity'</span>: <span class="pl-s">'I-LOC'</span>, <span class="pl-s">'index'</span>: <span class="pl-c1">11</span>},
{<span class="pl-s">'word'</span>: <span class="pl-s">'York'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.9988483190536499</span>, <span class="pl-s">'entity'</span>: <span class="pl-s">'I-LOC'</span>, <span class="pl-s">'index'</span>: <span class="pl-c1">12</span>},
{<span class="pl-s">'word'</span>: <span class="pl-s">'City'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.9991773366928101</span>, <span class="pl-s">'entity'</span>: <span class="pl-s">'I-LOC'</span>, <span class="pl-s">'index'</span>: <span class="pl-c1">13</span>}
]</pre></div>
<p dir="auto">However, the NER pipeline with <code class="notranslate">grouped_entities=True</code> outputs only word, score, and entity type. Here's the code snippet and output. There's also the problem of 'New York City' being duplicated, but I will address that in a new issue.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from transformers import pipeline
nlp_with_grouping = pipeline("ner", grouped_entities=True)
sequence = "Hugging Face Inc. is a company based in New York City."
print(nlp_with_grouping(sequence))
[
{'entity_group': 'I-ORG', 'score': 0.9937137961387634, 'word': 'Hugging Face Inc'},
{'entity_group': 'I-LOC', 'score': 0.9990174969037374, 'word': 'New York City'},
{'entity_group': 'I-LOC', 'score': 0.9990174969037374, 'word': 'New York City'}
]"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">transformers</span> <span class="pl-k">import</span> <span class="pl-s1">pipeline</span>
<span class="pl-s1">nlp_with_grouping</span> <span class="pl-c1">=</span> <span class="pl-en">pipeline</span>(<span class="pl-s">"ner"</span>, <span class="pl-s1">grouped_entities</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">sequence</span> <span class="pl-c1">=</span> <span class="pl-s">"Hugging Face Inc. is a company based in New York City."</span>
<span class="pl-en">print</span>(<span class="pl-en">nlp_with_grouping</span>(<span class="pl-s1">sequence</span>))
[
{<span class="pl-s">'entity_group'</span>: <span class="pl-s">'I-ORG'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.9937137961387634</span>, <span class="pl-s">'word'</span>: <span class="pl-s">'Hugging Face Inc'</span>},
{<span class="pl-s">'entity_group'</span>: <span class="pl-s">'I-LOC'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.9990174969037374</span>, <span class="pl-s">'word'</span>: <span class="pl-s">'New York City'</span>},
{<span class="pl-s">'entity_group'</span>: <span class="pl-s">'I-LOC'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.9990174969037374</span>, <span class="pl-s">'word'</span>: <span class="pl-s">'New York City'</span>}
]</pre></div>
<p dir="auto">I believe that the grouped entities returned should also include the tokens of the entities. Sample output would look as such</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[
{'entity_group': 'I-ORG', 'score': 0.9930560886859894, 'word': 'Hugging Face Inc', 'indexes': [1, 2, 3, 4]},
{'entity_group': 'I-LOC', 'score': 0.998809814453125, 'word': 'New York City', 'indexes': [11, 12, 13]},
{'entity_group': 'I-LOC', 'score': 0.998809814453125, 'word': 'New York City', 'indexes': [11, 12, 13]}
]"><pre class="notranslate">[
{<span class="pl-s">'entity_group'</span>: <span class="pl-s">'I-ORG'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.9930560886859894</span>, <span class="pl-s">'word'</span>: <span class="pl-s">'Hugging Face Inc'</span>, <span class="pl-s">'indexes'</span>: [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>]},
{<span class="pl-s">'entity_group'</span>: <span class="pl-s">'I-LOC'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.998809814453125</span>, <span class="pl-s">'word'</span>: <span class="pl-s">'New York City'</span>, <span class="pl-s">'indexes'</span>: [<span class="pl-c1">11</span>, <span class="pl-c1">12</span>, <span class="pl-c1">13</span>]},
{<span class="pl-s">'entity_group'</span>: <span class="pl-s">'I-LOC'</span>, <span class="pl-s">'score'</span>: <span class="pl-c1">0.998809814453125</span>, <span class="pl-s">'word'</span>: <span class="pl-s">'New York City'</span>, <span class="pl-s">'indexes'</span>: [<span class="pl-c1">11</span>, <span class="pl-c1">12</span>, <span class="pl-c1">13</span>]}
]</pre></div>
<h2 dir="auto">Motivation</h2>
<p dir="auto"><strong>Any application that requires users to locate grouped named entities would require some sort of index.</strong> This feature is present in the standard NER pipeline and should also exist in the grouped entity NER pipeline as well.</p>
<p dir="auto">In my case, I am trying to append the type to the text right after the named entity ("Apple" would become "Apple <I-ORG>") so I need to be able to locate the named entity within my phrase.</p>
<h2 dir="auto">Your contribution</h2>
<p dir="auto">I have been able to fix this by adding two lines to <code class="notranslate">group_sub_entities</code> function </p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/huggingface/transformers/blob/7fad617dc1fc681a7f5da5e0172c8b83f4bf0024/src/transformers/pipelines.py#L1042">transformers/src/transformers/pipelines.py</a>
</p>
<p class="mb-0 color-fg-muted">
Line 1042
in
<a data-pjax="true" class="commit-tease-sha" href="/huggingface/transformers/commit/7fad617dc1fc681a7f5da5e0172c8b83f4bf0024">7fad617</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L1042" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1042"></td>
<td id="LC1042" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">def</span> <span class="pl-en">group_sub_entities</span>(<span class="pl-s1">self</span>, <span class="pl-s1">entities</span>: <span class="pl-v">List</span>[<span class="pl-s1">dict</span>]) <span class="pl-c1">-></span> <span class="pl-s1">dict</span>: </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" def group_sub_entities(self, entities: List[dict]) -> dict:
"""
Returns grouped sub entities
"""
# Get the first entity in the entity group
entity = entities[0]["entity"]
scores = np.mean([entity["score"] for entity in entities])
tokens = [entity["word"] for entity in entities]
indexes = [entity["index"] for entity in entities] # my added line
entity_group = {
"entity_group": entity,
"score": np.mean(scores),
"word": self.tokenizer.convert_tokens_to_string(tokens),
"indexes": indexes # my added line
}
return entity_group"><pre class="notranslate"> <span class="pl-k">def</span> <span class="pl-en">group_sub_entities</span>(<span class="pl-s1">self</span>, <span class="pl-s1">entities</span>: <span class="pl-v">List</span>[<span class="pl-s1">dict</span>]) <span class="pl-c1">-></span> <span class="pl-s1">dict</span>:
<span class="pl-s">"""</span>
<span class="pl-s"> Returns grouped sub entities</span>
<span class="pl-s"> """</span>
<span class="pl-c"># Get the first entity in the entity group</span>
<span class="pl-s1">entity</span> <span class="pl-c1">=</span> <span class="pl-s1">entities</span>[<span class="pl-c1">0</span>][<span class="pl-s">"entity"</span>]
<span class="pl-s1">scores</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">mean</span>([<span class="pl-s1">entity</span>[<span class="pl-s">"score"</span>] <span class="pl-k">for</span> <span class="pl-s1">entity</span> <span class="pl-c1">in</span> <span class="pl-s1">entities</span>])
<span class="pl-s1">tokens</span> <span class="pl-c1">=</span> [<span class="pl-s1">entity</span>[<span class="pl-s">"word"</span>] <span class="pl-k">for</span> <span class="pl-s1">entity</span> <span class="pl-c1">in</span> <span class="pl-s1">entities</span>]
<span class="pl-s1">indexes</span> <span class="pl-c1">=</span> [<span class="pl-s1">entity</span>[<span class="pl-s">"index"</span>] <span class="pl-k">for</span> <span class="pl-s1">entity</span> <span class="pl-c1">in</span> <span class="pl-s1">entities</span>] <span class="pl-c"># my added line</span>
<span class="pl-s1">entity_group</span> <span class="pl-c1">=</span> {
<span class="pl-s">"entity_group"</span>: <span class="pl-s1">entity</span>,
<span class="pl-s">"score"</span>: <span class="pl-s1">np</span>.<span class="pl-en">mean</span>(<span class="pl-s1">scores</span>),
<span class="pl-s">"word"</span>: <span class="pl-s1">self</span>.<span class="pl-s1">tokenizer</span>.<span class="pl-en">convert_tokens_to_string</span>(<span class="pl-s1">tokens</span>),
<span class="pl-s">"indexes"</span>: <span class="pl-s1">indexes</span> <span class="pl-c"># my added line</span>
}
<span class="pl-k">return</span> <span class="pl-s1">entity_group</span></pre></div> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report => search github for a similar issue or PR before submitting
[x ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ ] bug report => search github for a similar issue or PR before submitting
[x ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
I have an angular 2 app that gives a number of errors like the one below when the app is build using angular cli 1.0</p>
<p dir="auto">ERROR in C:/Source/xxx/MemberUI/src/$$_gendir/app/journal/journal-component.ngfactory.ts (232,79): Supplied parameters do not match any signature of call target.</p>
<p dir="auto">Unfortunately, this is to little information for me to fix the bug and I am unable to see the generated ngfactory file to learn more.</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.4.10</li>
</ul>
<p dir="auto">(unfortunately, the app does not work yet with 4.0.1)</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Language:</strong> TS 2.1.5</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =<br>
7.7.1</p>
</li>
</ul> | <h3 dir="auto">Bug Report or Feature Request (mark with an <code class="notranslate">x</code>)</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- [ ] bug report -> please search issues before submitting
- [X] feature request"><pre class="notranslate"><code class="notranslate">- [ ] bug report -> please search issues before submitting
- [X] feature request
</code></pre></div>
<h3 dir="auto">Versions.</h3>
<p dir="auto">angular-cli 1.0.0<br>
angular 2.4.10</p>
<h3 dir="auto">Repro steps.</h3>
<p dir="auto">With the latest bugfix that uncovered AOT errors, I noticed how hard it is to pinpoint those errors. The reason is that all we get is an error during compilation like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in /src/$$_gendir/app/lazy/support/support.component.ngfactory.ts (2126,52): Supplied parameters do not match any signature of call target."><pre class="notranslate"><code class="notranslate">ERROR in /src/$$_gendir/app/lazy/support/support.component.ngfactory.ts (2126,52): Supplied parameters do not match any signature of call target.
</code></pre></div>
<p dir="auto">The offending file is transient and cannot be inspected. Due to the recently fixed bug, the code error has been there for a long time and it is now very difficult to spot the offending code in a module that has been working for months.</p>
<h3 dir="auto">Desired functionality.</h3>
<p dir="auto">There should be a way to inspect (= keep) the transient file to get a better idea what the AOT compiler complains about.</p> | 1 |
<p dir="auto">This (bogus) piece of code seems to cause ICE:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pub struct Foo { x: usize }
fn main() {
static mut FOO: *mut Foo = 0 as *mut Foo;
let _foo = unsafe { *FOO.clone() };
}"><pre class="notranslate"><span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-c1">x</span><span class="pl-kos">:</span> <span class="pl-smi">usize</span> <span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-k">mut</span> <span class="pl-v">FOO</span><span class="pl-kos">:</span> <span class="pl-c1">*</span><span class="pl-k">mut</span> <span class="pl-smi">Foo</span> = <span class="pl-c1">0</span> <span class="pl-k">as</span> <span class="pl-c1">*</span><span class="pl-k">mut</span> <span class="pl-smi">Foo</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> _foo = <span class="pl-k">unsafe</span> <span class="pl-kos">{</span> <span class="pl-c1">*</span><span class="pl-v">FOO</span><span class="pl-kos">.</span><span class="pl-en">clone</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ice1.rs:7:25: 7:37 error: internal compiler error: this path should not cause illegal move
ice1.rs:7 let _foo = unsafe { *FOO.clone() };
^~~~~~~~~~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:126
stack backtrace:
1: 0x7f39eddf5a20 - sys::backtrace::write::h8a4dc9e73e8a435dvRt
2: 0x7f39ede178c0 - failure::on_fail::h2ba8afb30d5ff67304z
3: 0x7f39edd86180 - rt::unwind::begin_unwind_inner::h312ad0c8f7e45209eKz
4: 0x7f39e85fb260 - rt::unwind::begin_unwind::h15315692592335573570
5: 0x7f39e85fb1f0 - diagnostic::SpanHandler::span_bug::h11bfe9a4af254f3cEpF
6: 0x7f39ebc46810 - session::Session::span_bug::ha51922765346cd16Qcp
7: 0x7f39ec82fad0 - borrowck::build_borrowck_dataflow_data::hebc757194a8694e9cQe
8: 0x7f39ec82c810 - borrowck::borrowck_fn::haef4dce7234d2ed4zNe
9: 0x7f39ec82d720 - borrowck::borrowck_item::h1b395aabbbe3f362xMe
10: 0x7f39ec82dc90 - borrowck::check_crate::h2223249b2c5fb97apHe
11: 0x7f39ee383470 - driver::phase_3_run_analysis_passes::h3ddac035093704e2WFa
12: 0x7f39ee370c90 - driver::compile_input::h8f87e6545ca866f1Cba
13: 0x7f39ee43b8e0 - run_compiler::h01aa999b613651f1l9b
14: 0x7f39ee43a050 - thunk::F.Invoke<A, R>::invoke::h5072366889563560254
15: 0x7f39ee438fb0 - rt::unwind::try::try_fn::h15081826542860147634
16: 0x7f39ede7e930 - rust_try_inner
17: 0x7f39ede7e920 - rust_try
18: 0x7f39ee439260 - thunk::F.Invoke<A, R>::invoke::h301471058200503190
19: 0x7f39ede05550 - sys::thread::thread_start::h204ed77b5f1055c7QGw
20: 0x7f39e7e0dd30 - start_thread
21: 0x7f39eda273a9 - clone
22: 0x0 - <unknown>"><pre class="notranslate"><code class="notranslate">ice1.rs:7:25: 7:37 error: internal compiler error: this path should not cause illegal move
ice1.rs:7 let _foo = unsafe { *FOO.clone() };
^~~~~~~~~~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:126
stack backtrace:
1: 0x7f39eddf5a20 - sys::backtrace::write::h8a4dc9e73e8a435dvRt
2: 0x7f39ede178c0 - failure::on_fail::h2ba8afb30d5ff67304z
3: 0x7f39edd86180 - rt::unwind::begin_unwind_inner::h312ad0c8f7e45209eKz
4: 0x7f39e85fb260 - rt::unwind::begin_unwind::h15315692592335573570
5: 0x7f39e85fb1f0 - diagnostic::SpanHandler::span_bug::h11bfe9a4af254f3cEpF
6: 0x7f39ebc46810 - session::Session::span_bug::ha51922765346cd16Qcp
7: 0x7f39ec82fad0 - borrowck::build_borrowck_dataflow_data::hebc757194a8694e9cQe
8: 0x7f39ec82c810 - borrowck::borrowck_fn::haef4dce7234d2ed4zNe
9: 0x7f39ec82d720 - borrowck::borrowck_item::h1b395aabbbe3f362xMe
10: 0x7f39ec82dc90 - borrowck::check_crate::h2223249b2c5fb97apHe
11: 0x7f39ee383470 - driver::phase_3_run_analysis_passes::h3ddac035093704e2WFa
12: 0x7f39ee370c90 - driver::compile_input::h8f87e6545ca866f1Cba
13: 0x7f39ee43b8e0 - run_compiler::h01aa999b613651f1l9b
14: 0x7f39ee43a050 - thunk::F.Invoke<A, R>::invoke::h5072366889563560254
15: 0x7f39ee438fb0 - rt::unwind::try::try_fn::h15081826542860147634
16: 0x7f39ede7e930 - rust_try_inner
17: 0x7f39ede7e920 - rust_try
18: 0x7f39ee439260 - thunk::F.Invoke<A, R>::invoke::h301471058200503190
19: 0x7f39ede05550 - sys::thread::thread_start::h204ed77b5f1055c7QGw
20: 0x7f39e7e0dd30 - start_thread
21: 0x7f39eda273a9 - clone
22: 0x0 - <unknown>
</code></pre></div> | <p dir="auto">Input:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct T(u8);
fn t() -> *mut T {
unsafe { 0u8 as *mut T }
}
fn main() {
let a = unsafe { *t() };
}"><pre class="notranslate"><span class="pl-k">struct</span> <span class="pl-smi">T</span><span class="pl-kos">(</span><span class="pl-smi">u8</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">t</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -> <span class="pl-c1">*</span><span class="pl-k">mut</span> <span class="pl-smi">T</span> <span class="pl-kos">{</span>
<span class="pl-k">unsafe</span> <span class="pl-kos">{</span> <span class="pl-c1">0u8</span> <span class="pl-k">as</span> <span class="pl-c1">*</span><span class="pl-k">mut</span> <span class="pl-smi">T</span> <span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> a = <span class="pl-k">unsafe</span> <span class="pl-kos">{</span> <span class="pl-c1">*</span><span class="pl-en">t</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc ../test.rs
../test.rs:9:19: 9:23 error: internal compiler error: this path should not cause illegal move
../test.rs:9 let a = unsafe { *t() };
^~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /Users/John/Documents/dev/rust/src/libsyntax/diagnostic.rs:123
stack backtrace:
1: 0x10f825b75 - sys::backtrace::write::h757d4037fec4513elCt
2: 0x10f84800f - failure::on_fail::he99e1d2cd81a67a80Hz
3: 0x10f7b3c8a - rt::unwind::begin_unwind_inner::hede15ebc165353e0Qpz
4: 0x10d508707 - rt::unwind::begin_unwind::h5150449308391082809
5: 0x10d50869c - diagnostic::SpanHandler::span_bug::h1cc7aa850b4525b9nQF
6: 0x10c93bc1d - session::Session::span_bug::h9dff6f0c981e0b95mRq
7: 0x10c547999 - borrowck::build_borrowck_dataflow_data::hbfab9f3785e58ec8QRe
8: 0x10c5432fb - borrowck::borrowck_fn::h9d4d5a57ec1e26a2cPe
9: 0x10c5440f2 - borrowck::borrowck_item::hd3de64f0b51b624a9Ne
10: 0x10c54461f - borrowck::check_crate::hab49ad1d67fb67e9ZIe
11: 0x10c09e8aa - driver::phase_3_run_analysis_passes::h3bf5eb3f470c8788gwa
12: 0x10c082d90 - driver::compile_input::h63293298907e332cxba
13: 0x10c14e7ba - monitor::unboxed_closure.22558
14: 0x10c14cf15 - thunk::F.Invoke<A, R>::invoke::h15985566512806182469
15: 0x10c14bcf0 - rt::unwind::try::try_fn::h5957420952141477940
16: 0x10f8b1189 - rust_try_inner
17: 0x10f8b1176 - rust_try
18: 0x10c14c3ec - thunk::F.Invoke<A, R>::invoke::h12578415658120090831
19: 0x10f835814 - sys::thread::thread_start::he6c5dcba45c95bf2drw
20: 0x7fff933e22fc - _pthread_body
21: 0x7fff933e2279 - _pthread_body"><pre class="notranslate"><code class="notranslate">$ rustc ../test.rs
../test.rs:9:19: 9:23 error: internal compiler error: this path should not cause illegal move
../test.rs:9 let a = unsafe { *t() };
^~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /Users/John/Documents/dev/rust/src/libsyntax/diagnostic.rs:123
stack backtrace:
1: 0x10f825b75 - sys::backtrace::write::h757d4037fec4513elCt
2: 0x10f84800f - failure::on_fail::he99e1d2cd81a67a80Hz
3: 0x10f7b3c8a - rt::unwind::begin_unwind_inner::hede15ebc165353e0Qpz
4: 0x10d508707 - rt::unwind::begin_unwind::h5150449308391082809
5: 0x10d50869c - diagnostic::SpanHandler::span_bug::h1cc7aa850b4525b9nQF
6: 0x10c93bc1d - session::Session::span_bug::h9dff6f0c981e0b95mRq
7: 0x10c547999 - borrowck::build_borrowck_dataflow_data::hbfab9f3785e58ec8QRe
8: 0x10c5432fb - borrowck::borrowck_fn::h9d4d5a57ec1e26a2cPe
9: 0x10c5440f2 - borrowck::borrowck_item::hd3de64f0b51b624a9Ne
10: 0x10c54461f - borrowck::check_crate::hab49ad1d67fb67e9ZIe
11: 0x10c09e8aa - driver::phase_3_run_analysis_passes::h3bf5eb3f470c8788gwa
12: 0x10c082d90 - driver::compile_input::h63293298907e332cxba
13: 0x10c14e7ba - monitor::unboxed_closure.22558
14: 0x10c14cf15 - thunk::F.Invoke<A, R>::invoke::h15985566512806182469
15: 0x10c14bcf0 - rt::unwind::try::try_fn::h5957420952141477940
16: 0x10f8b1189 - rust_try_inner
17: 0x10f8b1176 - rust_try
18: 0x10c14c3ec - thunk::F.Invoke<A, R>::invoke::h12578415658120090831
19: 0x10f835814 - sys::thread::thread_start::he6c5dcba45c95bf2drw
20: 0x7fff933e22fc - _pthread_body
21: 0x7fff933e2279 - _pthread_body
</code></pre></div> | 1 |
<p dir="auto">When I run the latest master branch with docker-compose.yml, then I login as admin with password admin. But once I login, there is just a close button and I can see the following error in one of the container.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="superset-node_1 |
superset-node_1 | > [email protected] dev /app/superset/assets
superset-node_1 | > webpack --mode=development --colors --progress --debug --watch
superset-node_1 |
superset-node_1 | sh: 1: webpack: not found
superset-node_1 | npm ERR! code ELIFECYCLE
superset-node_1 | npm ERR! syscall spawn
superset-node_1 | npm ERR! file sh
superset-node_1 | npm ERR! errno ENOENT
superset-node_1 | npm ERR! [email protected] dev: `webpack --mode=development --colors --progress --debug --watch`
superset-node_1 | npm ERR! spawn ENOENT
superset-node_1 | npm ERR!
superset-node_1 | npm ERR! Failed at the [email protected] dev script.
superset-node_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
superset-node_1 |
superset-node_1 | npm ERR! A complete log of this run can be found in:
superset-node_1 | npm ERR! /root/.npm/_logs/2019-12-23T02_34_06_505Z-debug.log
incubator-superset_superset-node_1 exited with code 1"><pre class="notranslate"><code class="notranslate">superset-node_1 |
superset-node_1 | > [email protected] dev /app/superset/assets
superset-node_1 | > webpack --mode=development --colors --progress --debug --watch
superset-node_1 |
superset-node_1 | sh: 1: webpack: not found
superset-node_1 | npm ERR! code ELIFECYCLE
superset-node_1 | npm ERR! syscall spawn
superset-node_1 | npm ERR! file sh
superset-node_1 | npm ERR! errno ENOENT
superset-node_1 | npm ERR! [email protected] dev: `webpack --mode=development --colors --progress --debug --watch`
superset-node_1 | npm ERR! spawn ENOENT
superset-node_1 | npm ERR!
superset-node_1 | npm ERR! Failed at the [email protected] dev script.
superset-node_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
superset-node_1 |
superset-node_1 | npm ERR! A complete log of this run can be found in:
superset-node_1 | npm ERR! /root/.npm/_logs/2019-12-23T02_34_06_505Z-debug.log
incubator-superset_superset-node_1 exited with code 1
</code></pre></div>
<h2 dir="auto">/root/.npm/_logs/2019-12-23T02_34_06_505Z-debug.log</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle [email protected]~predev: [email protected]
6 info lifecycle [email protected]~dev: [email protected]
7 verbose lifecycle [email protected]~dev: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~dev: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/app/superset/assets/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle [email protected]~dev: CWD: /app/superset/assets
10 silly lifecycle [email protected]~dev: Args: [ '-c',
10 silly lifecycle 'webpack --mode=development --colors --progress --debug --watch' ]
11 info lifecycle [email protected]~dev: Failed to exec dev script
12 verbose stack Error: [email protected] dev: `webpack --mode=development --colors --progress --debug --watch`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:198:13)
12 verbose stack at maybeClose (internal/child_process.js:982:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
13 verbose pkgid [email protected]
14 verbose cwd /app/superset/assets
15 verbose Linux 4.9.184-linuxkit
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
17 verbose node v10.18.0
18 verbose npm v6.13.4
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error [email protected] dev: `webpack --mode=development --colors --progress --debug --watch`
23 error spawn ENOENT
24 error Failed at the [email protected] dev script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]"><pre class="notranslate"><code class="notranslate">0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle [email protected]~predev: [email protected]
6 info lifecycle [email protected]~dev: [email protected]
7 verbose lifecycle [email protected]~dev: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~dev: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/app/superset/assets/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle [email protected]~dev: CWD: /app/superset/assets
10 silly lifecycle [email protected]~dev: Args: [ '-c',
10 silly lifecycle 'webpack --mode=development --colors --progress --debug --watch' ]
11 info lifecycle [email protected]~dev: Failed to exec dev script
12 verbose stack Error: [email protected] dev: `webpack --mode=development --colors --progress --debug --watch`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:198:13)
12 verbose stack at maybeClose (internal/child_process.js:982:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
13 verbose pkgid [email protected]
14 verbose cwd /app/superset/assets
15 verbose Linux 4.9.184-linuxkit
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
17 verbose node v10.18.0
18 verbose npm v6.13.4
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error [email protected] dev: `webpack --mode=development --colors --progress --debug --watch`
23 error spawn ENOENT
24 error Failed at the [email protected] dev script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
</code></pre></div> | <p dir="auto">Reviewing the documentation and example PRs for how to add a new visualisation, I have followed those steps as closely as possible (apart from some folders which seem to have been moved). When adding the new visualiation to a dashboard, I get the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="An error occurred while rendering the visualization: Error: Item with key "custom_vis" is not registered."><pre class="notranslate"><code class="notranslate">An error occurred while rendering the visualization: Error: Item with key "custom_vis" is not registered.
</code></pre></div>
<h3 dir="auto">Expected results</h3>
<p dir="auto">The visualisation loads</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">A yellow box displays with the error, along with the same message through console.warn.</p>
<h4 dir="auto">How to reproduce the bug</h4>
<p dir="auto">Follow the structure of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="237412594" data-permission-text="Title is private" data-url="https://github.com/apache/superset/issues/3013" data-hovercard-type="pull_request" data-hovercard-url="/apache/superset/pull/3013/hovercard" href="https://github.com/apache/superset/pull/3013">#3013</a> in order to create a new visualisation, run <code class="notranslate">npm run build</code> and <code class="notranslate">npm run sync-backend</code>, start server. Add new chart using the visualisation, and add to dashboard. Visit dashboard.</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>superset version: <code class="notranslate">v0.29rc7</code></li>
<li>python version: <code class="notranslate">Python 3.7.3</code></li>
<li>node.js version: <code class="notranslate">v11.11.0</code></li>
<li>npm version: <code class="notranslate">6.7.0</code></li>
</ul>
<h3 dir="auto">Checklist</h3>
<p dir="auto">Make sure these boxes are checked before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have reproduced the issue with at least the latest released version of superset.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar.</li>
</ul> | 0 |
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide a description of the new feature</h2>
<p dir="auto"><em>What is the expected behavior of the proposed feature? What is the scenario this would be used?</em></p>
<p dir="auto">In the PT-Run window, if I want to select the 2nd item, I must use arrow keys or mouse, which could be more efficient<br>
by introducing <code class="notranslate">ALT</code>+<code class="notranslate">Num</code> as the shortcut to choose the items.</p>
<p dir="auto"><a href="https://github.com/Flow-Launcher/Flow.Launcher">Flow.Launcher</a> supports this already:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3035071/96739308-3e1c7d80-13f2-11eb-8517-0262c4f8ccf7.png"><img src="https://user-images.githubusercontent.com/3035071/96739308-3e1c7d80-13f2-11eb-8517-0262c4f8ccf7.png" alt="图片" style="max-width: 100%;"></a></p>
<p dir="auto">It allows me to use <code class="notranslate">ALT</code>+<code class="notranslate">1</code>-<code class="notranslate">9</code> to select items, which is more handy than mouse or arrow keys.</p>
<hr>
<p dir="auto">If you'd like to see this feature implemented, add a <g-emoji class="g-emoji" alias="+1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png">👍</g-emoji> reaction to this post.</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [run "ver" at a command prompt]
PowerToys version: 0.16
PowerToy module for which you are reporting the bug (if applicable): General"><pre class="notranslate"><code class="notranslate">Windows build number: [run "ver" at a command prompt]
PowerToys version: 0.16
PowerToy module for which you are reporting the bug (if applicable): General
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Wait for an update to install, then don't install it for a few days<br>
Open the action center</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">There is one notification there telling you about the update</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">There are as many notifications there as days have passed, which all say the same thing and take up space</p>
<h1 dir="auto">Screenshots</h1>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/21208315/78919252-8243c400-7a46-11ea-9d10-e19cbe954d14.png"><img src="https://user-images.githubusercontent.com/21208315/78919252-8243c400-7a46-11ea-9d10-e19cbe954d14.png" alt="image" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">See discussion here:<br>
<a href="http://stackoverflow.com/questions/16999586/matplotlib-wont-plot-line-of-same-x-values/17000144?noredirect=1#comment24658630_17000144" rel="nofollow">http://stackoverflow.com/questions/16999586/matplotlib-wont-plot-line-of-same-x-values/17000144?noredirect=1#comment24658630_17000144</a></p>
<p dir="auto">If a graph is generated with a single horizontal line, the line is not visible in Chrome, but it is in Illustrator and in Internet Explorer.</p>
<p dir="auto">As soon as the line stops being "straight" it becomes visible. This is not a reproduction of the vertical/horizontal issue with zoom/refresh.</p> | <p dir="auto">Perfectly horizontal or vertical lines do not show up in svgs on my machine. Could be an issue with my specific setup, I am curious if anyone else can reproduce the issue.</p>
<p dir="auto">Here is the code that causes the bug for me:</p>
<p dir="auto">import pylab as plt<br>
plt.plot([-1,1],[1,1]) #perfectly horizontal line does not render<br>
plt.savefig('/Users/Andrew/Desktop/plot.svg', format='svg')</p>
<p dir="auto">Here is a workaround I found:</p>
<p dir="auto">import pylab as plt<br>
plt.plot([-1,1],[1,1.001]) #not a perfectly horizontal line; renders<br>
plt.savefig('/Users/Andrew/Desktop/plot.svg', format='svg')</p>
<p dir="auto">My environment:<br>
Matplotlib 1.10 on Mac OS X 10.7 obtained from Enthought</p> | 1 |
<p dir="auto">Hi</p>
<p dir="auto">a bunch of examples seem to be missing <code class="notranslate">import numpy as np</code>. At least for me they throw <code class="notranslate">NameError: name 'np' is not defined</code>.</p>
<p dir="auto">Following examples seem to be missing <code class="notranslate">import numpy as np</code> (non exhaustive):</p>
<ul dir="auto">
<li>scipy.signal.spectrogram</li>
<li>scipy.signal.periodogram</li>
<li>scipy.signal.welch</li>
</ul>
<p dir="auto"><code class="notranslate">scipy.__version__</code> gives <code class="notranslate">1.4.1</code>. However, the examples seem to be the same in the current master.</p>
<p dir="auto">Maybe I am missing something? Any help is appreciated!<br>
Thanks :)</p> | <p dir="auto">It is not really a bug but an issue of typical int32 overflow.<br>
Below is an image, which, if converted to a numpy matrix is int32 and the scipy center of mass function delivers coordinates outside the grid, which is wrong. This happens, because in scipy:<br>
<code class="notranslate">normalizer = sum(input, labels, index)</code><br>
overflows. Especially as 16bit images contain large numbers.</p>
<p dir="auto">There are many methods to avoid, like making the matrix float, etc, but can it maybe be handled inside the scipy functions?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/44144239/185934034-d7382b2f-6f36-4416-b144-5ac5c16722d8.png"><img src="https://user-images.githubusercontent.com/44144239/185934034-d7382b2f-6f36-4416-b144-5ac5c16722d8.png" alt="nf_2" style="max-width: 100%;"></a></p>
<h3 dir="auto">Reproducing Code Example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from PIL import Image
from scipy import ndimage
import numpy as np
im = Image.open('nf_2.png')
npa = np.array(im)
print(npa.shape,npa.dtype) # is int32
print('min/max of array',npa.min(),npa.max())
print(ndimage.center_of_mass(npa))
com_x = 0.0
com_y = 0.0
sum = 0.0 # float
for x in range(npa.shape[1]):
for y in range(npa.shape[0]):
sum += npa[y][x] # overflow if sum is int32
com_x += float(npa[y][x])*float(x)
com_y += float(npa[y][x])*float(y)
com_x /= sum
com_y /= sum
print('should be:',com_y,com_x)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-v">PIL</span> <span class="pl-k">import</span> <span class="pl-v">Image</span>
<span class="pl-k">from</span> <span class="pl-s1">scipy</span> <span class="pl-k">import</span> <span class="pl-s1">ndimage</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">im</span> <span class="pl-c1">=</span> <span class="pl-v">Image</span>.<span class="pl-en">open</span>(<span class="pl-s">'nf_2.png'</span>)
<span class="pl-s1">npa</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-s1">im</span>)
<span class="pl-en">print</span>(<span class="pl-s1">npa</span>.<span class="pl-s1">shape</span>,<span class="pl-s1">npa</span>.<span class="pl-s1">dtype</span>) <span class="pl-c"># is int32</span>
<span class="pl-en">print</span>(<span class="pl-s">'min/max of array'</span>,<span class="pl-s1">npa</span>.<span class="pl-en">min</span>(),<span class="pl-s1">npa</span>.<span class="pl-en">max</span>())
<span class="pl-en">print</span>(<span class="pl-s1">ndimage</span>.<span class="pl-en">center_of_mass</span>(<span class="pl-s1">npa</span>))
<span class="pl-s1">com_x</span> <span class="pl-c1">=</span> <span class="pl-c1">0.0</span>
<span class="pl-s1">com_y</span> <span class="pl-c1">=</span> <span class="pl-c1">0.0</span>
<span class="pl-s1">sum</span> <span class="pl-c1">=</span> <span class="pl-c1">0.0</span> <span class="pl-c"># float</span>
<span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-s1">npa</span>.<span class="pl-s1">shape</span>[<span class="pl-c1">1</span>]):
<span class="pl-k">for</span> <span class="pl-s1">y</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-s1">npa</span>.<span class="pl-s1">shape</span>[<span class="pl-c1">0</span>]):
<span class="pl-s1">sum</span> <span class="pl-c1">+=</span> <span class="pl-s1">npa</span>[<span class="pl-s1">y</span>][<span class="pl-s1">x</span>] <span class="pl-c"># overflow if sum is int32</span>
<span class="pl-s1">com_x</span> <span class="pl-c1">+=</span> <span class="pl-en">float</span>(<span class="pl-s1">npa</span>[<span class="pl-s1">y</span>][<span class="pl-s1">x</span>])<span class="pl-c1">*</span><span class="pl-en">float</span>(<span class="pl-s1">x</span>)
<span class="pl-s1">com_y</span> <span class="pl-c1">+=</span> <span class="pl-en">float</span>(<span class="pl-s1">npa</span>[<span class="pl-s1">y</span>][<span class="pl-s1">x</span>])<span class="pl-c1">*</span><span class="pl-en">float</span>(<span class="pl-s1">y</span>)
<span class="pl-s1">com_x</span> <span class="pl-c1">/=</span> <span class="pl-s1">sum</span>
<span class="pl-s1">com_y</span> <span class="pl-c1">/=</span> <span class="pl-s1">sum</span>
<span class="pl-en">print</span>(<span class="pl-s">'should be:'</span>,<span class="pl-s1">com_y</span>,<span class="pl-s1">com_x</span>)</pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="(1216, 1936) int32
min/max of array 96 65520
(2645.1217782736508, 4121.233298317583)
should be: 622.3249332060187 969.6136707837329"><pre class="notranslate">(1216, 1936) int32
min/max of array 96 65520
(2645.1217782736508, 4121.233298317583)
should be: 622.3249332060187 969.6136707837329</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version information</h3>
<p dir="auto">1.7.1 1.20.3 sys.version_info(major=3, minor=7, micro=7, releaselevel='final', serial=0)</p> | 0 |
<p dir="auto">Chrome for Mac. Taken from <a href="http://localhost:9001/examples/justified-nav/" rel="nofollow">http://localhost:9001/examples/justified-nav/</a></p>
<p dir="auto">Start large screen, go small, then go large again. Also tested on Safari, where it's also an issue.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/8e2a4b14cf9a9098761bd7610c2b375d412741a8eb791f0f1633d0cadd7a8ec8/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3733313734332f313032323134322f34616234393665362d306436342d313165332d393463662d6333613432643139616334362e706e67"><img src="https://camo.githubusercontent.com/8e2a4b14cf9a9098761bd7610c2b375d412741a8eb791f0f1633d0cadd7a8ec8/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3733313734332f313032323134322f34616234393665362d306436342d313165332d393463662d6333613432643139616334362e706e67" alt="screen shot 2013-08-25 at 09 56 23" data-canonical-src="https://f.cloud.github.com/assets/731743/1022142/4ab496e6-0d64-11e3-94cf-c3a42d19ac46.png" style="max-width: 100%;"></a></p> | <p dir="auto">The justified nav example (<a href="http://getbootstrap.com/examples/justified-nav" rel="nofollow">http://getbootstrap.com/examples/justified-nav</a>) collapses perfectly when the screen is narrowed, but when the screen is expanded it get wonky.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/db69ca8e316e013e7709351d88ecf7d585b87ae58bdeb880ad477c8bc93e6608/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f38333730382f3938323439352f33383763663635362d303766382d313165332d393330382d6363376238306661653266642e706e67"><img src="https://camo.githubusercontent.com/db69ca8e316e013e7709351d88ecf7d585b87ae58bdeb880ad477c8bc93e6608/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f38333730382f3938323439352f33383763663635362d303766382d313165332d393330382d6363376238306661653266642e706e67" alt="justified nav" data-canonical-src="https://f.cloud.github.com/assets/83708/982495/387cf656-07f8-11e3-9308-cc7b80fae2fd.png" style="max-width: 100%;"></a><br>
expanded</p> | 1 |
<p dir="auto">(k8s 1.1.4)</p>
<p dir="auto">After restarting my master server components, 2 out of 5 of my DaemonSet pods were terminated (why?) and never recreated. It seems like all <code class="notranslate">ds</code> pods were requeued during this event, however the IDs of the currently running pods do not even match what is reported by the DaemonSet.</p>
<ul dir="auto">
<li>Restarting the <code class="notranslate">kubelet</code> on faulty nodes does nothing but re-adding a SyncLoop</li>
<li>Restarting the <code class="notranslate">kube-controller-manager</code> again shows <code class="notranslate">Waiting for pods controller to sync, requeuing ds ingress-apis</code></li>
<li><code class="notranslate">kube-scheduler</code> shows no relevant information</li>
</ul>
<p dir="auto">The first message in the kubelet log ("... The image pull may not succeed.") makes me think it <em>might</em> be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="123204322" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/18947" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/18947/hovercard" href="https://github.com/kubernetes/kubernetes/issues/18947">#18947</a>, however:</p>
<ul dir="auto">
<li>a pull should not have been triggered since the imagePullPolicy is <code class="notranslate">IfNotPresent</code>, and the image was present before the restart</li>
<li><code class="notranslate">SyncLoop (ADD)</code> shouldn't have happened in the first place since 5 pods were already running before the restart</li>
</ul>
<h2 dir="auto"></h2>
<p dir="auto">Current state of the ds:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Name: ingress-apis
Image(s): nginx:1.9.7
Selector: app=ingress,tier=backend
Node-Selector: <none>
Labels: app=ingress,tier=backend
Desired Number of Nodes Scheduled: 5
Current Number of Nodes Scheduled: 5
Number of Nodes Misscheduled: 0
Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 2 Failed
Events:
FirstSeen LastSeen Count From SubobjectPath Reason Message
───────── ──────── ───── ──── ───────────── ────── ───────
40m 40m 1 {daemon-set } SuccessfulCreate Created pod: ingress-apis-0svoi
40m 40m 1 {daemon-set } SuccessfulCreate Created pod: ingress-apis-qn8tk
39m 39m 1 {daemon-set } SuccessfulCreate Created pod: ingress-apis-4p04e
39m 39m 1 {daemon-set } SuccessfulCreate Created pod: ingress-apis-2ncfy
39m 39m 1 {daemon-set } SuccessfulCreate Created pod: ingress-apis-v6iuf"><pre class="notranslate"><code class="notranslate">Name: ingress-apis
Image(s): nginx:1.9.7
Selector: app=ingress,tier=backend
Node-Selector: <none>
Labels: app=ingress,tier=backend
Desired Number of Nodes Scheduled: 5
Current Number of Nodes Scheduled: 5
Number of Nodes Misscheduled: 0
Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 2 Failed
Events:
FirstSeen LastSeen Count From SubobjectPath Reason Message
───────── ──────── ───── ──── ───────────── ────── ───────
40m 40m 1 {daemon-set } SuccessfulCreate Created pod: ingress-apis-0svoi
40m 40m 1 {daemon-set } SuccessfulCreate Created pod: ingress-apis-qn8tk
39m 39m 1 {daemon-set } SuccessfulCreate Created pod: ingress-apis-4p04e
39m 39m 1 {daemon-set } SuccessfulCreate Created pod: ingress-apis-2ncfy
39m 39m 1 {daemon-set } SuccessfulCreate Created pod: ingress-apis-v6iuf
</code></pre></div>
<h2 dir="auto"></h2>
<p dir="auto">Current pods:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="NAME READY STATUS RESTARTS AGE
ingress-apis-jwlqo 1/1 Running 0 19h
ingress-apis-mabp8 1/1 Running 0 17h
ingress-apis-rte9q 1/1 Running 0 19h"><pre class="notranslate"><code class="notranslate">NAME READY STATUS RESTARTS AGE
ingress-apis-jwlqo 1/1 Running 0 19h
ingress-apis-mabp8 1/1 Running 0 17h
ingress-apis-rte9q 1/1 Running 0 19h
</code></pre></div>
<h2 dir="auto"></h2>
<p dir="auto"><code class="notranslate">kubelet</code> logs on a faulty node:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--Jan 20 09:44:11--
kubelet.go:1477] Unable to retrieve pull secret default/docker-registry for default/ingress-apis-mensq due to Get https://k8s.freeletics.com/api/v1/namespaces/default/secrets/docker-registry: dial tcp 10.0.31.59:443: connection refused. The image pull may not succeed.
kubelet.go:2012] SyncLoop (ADD): "ingress-apis-0svoi_default"
kubelet.go:1862] Pod "ingress-apis-0svoi_default": HostPort is already allocated, ignoring: [[0].port: duplicate value '9080/TCP']
kubelet.go:2015] SyncLoop (UPDATE): "ingress-apis-mensq_default"
manager.go:1404] Killing container "bac67ab2623eb60b6d23e714feee4d74be6b5c3e7417f07b08bd874d2183245f nginx default/ingress-apis-mensq" with 30 second grace period
manager.go:1438] Container "bac67ab2623eb60b6d23e714feee4d74be6b5c3e7417f07b08bd874d2183245f nginx default/ingress-apis-mensq" exited after 68.511739ms
manager.go:1444] No ref for pod '"bac67ab2623eb60b6d23e714feee4d74be6b5c3e7417f07b08bd874d2183245f nginx default/ingress-apis-mensq"'
manager.go:1404] Killing container "eb0b4d358a9afe7aa2ac18d7f6eec57a6d2cd54506e4ae18096c7996c011de77 default/ingress-apis-mensq" with 30 second grace period
manager.go:1438] Container "eb0b4d358a9afe7aa2ac18d7f6eec57a6d2cd54506e4ae18096c7996c011de77 default/ingress-apis-mensq" exited after 213.225172ms
manager.go:1444] No ref for pod '"eb0b4d358a9afe7aa2ac18d7f6eec57a6d2cd54506e4ae18096c7996c011de77 default/ingress-apis-mensq"'
kubelet.go:2015] SyncLoop (UPDATE): "ingress-apis-mensq_default"
kubelet.go:2018] SyncLoop (REMOVE): "ingress-apis-mensq_default"
kubelet.go:2108] Failed to delete pod "ingress-apis-mensq_default", err: pod not found
--Jan 20 09:44:22--"><pre class="notranslate"><code class="notranslate">--Jan 20 09:44:11--
kubelet.go:1477] Unable to retrieve pull secret default/docker-registry for default/ingress-apis-mensq due to Get https://k8s.freeletics.com/api/v1/namespaces/default/secrets/docker-registry: dial tcp 10.0.31.59:443: connection refused. The image pull may not succeed.
kubelet.go:2012] SyncLoop (ADD): "ingress-apis-0svoi_default"
kubelet.go:1862] Pod "ingress-apis-0svoi_default": HostPort is already allocated, ignoring: [[0].port: duplicate value '9080/TCP']
kubelet.go:2015] SyncLoop (UPDATE): "ingress-apis-mensq_default"
manager.go:1404] Killing container "bac67ab2623eb60b6d23e714feee4d74be6b5c3e7417f07b08bd874d2183245f nginx default/ingress-apis-mensq" with 30 second grace period
manager.go:1438] Container "bac67ab2623eb60b6d23e714feee4d74be6b5c3e7417f07b08bd874d2183245f nginx default/ingress-apis-mensq" exited after 68.511739ms
manager.go:1444] No ref for pod '"bac67ab2623eb60b6d23e714feee4d74be6b5c3e7417f07b08bd874d2183245f nginx default/ingress-apis-mensq"'
manager.go:1404] Killing container "eb0b4d358a9afe7aa2ac18d7f6eec57a6d2cd54506e4ae18096c7996c011de77 default/ingress-apis-mensq" with 30 second grace period
manager.go:1438] Container "eb0b4d358a9afe7aa2ac18d7f6eec57a6d2cd54506e4ae18096c7996c011de77 default/ingress-apis-mensq" exited after 213.225172ms
manager.go:1444] No ref for pod '"eb0b4d358a9afe7aa2ac18d7f6eec57a6d2cd54506e4ae18096c7996c011de77 default/ingress-apis-mensq"'
kubelet.go:2015] SyncLoop (UPDATE): "ingress-apis-mensq_default"
kubelet.go:2018] SyncLoop (REMOVE): "ingress-apis-mensq_default"
kubelet.go:2108] Failed to delete pod "ingress-apis-mensq_default", err: pod not found
--Jan 20 09:44:22--
</code></pre></div>
<h2 dir="auto"></h2>
<p dir="auto"><code class="notranslate">kube-controller-manager</code> logs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--Jan 20 09:44:14--
controller.go:493] Waiting for pods controller to sync, requeuing ds ingress-apis
controller.go:493] Waiting for pods controller to sync, requeuing ds ingress-apis
controller.go:493] Waiting for pods controller to sync, requeuing ds ingress-apis
controller.go:493] Waiting for pods controller to sync, requeuing ds ingress-apis
controller.go:493] Waiting for pods controller to sync, requeuing ds ingress-apis
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"4b05bf3e-9c18-11e5-b4d2-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"63618203", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-0svoi
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"4b05bf3e-9c18-11e5-b4d2-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"63618203", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-qn8tk
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"4b05bf3e-9c18-11e5-b4d2-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"63618203", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-4p04e
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"4b05bf3e-9c18-11e5-b4d2-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"63618203", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-2ncfy
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"4b05bf3e-9c18-11e5-b4d2-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"63618203", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-v6iuf
--Jan 20 09:44:20--"><pre class="notranslate"><code class="notranslate">--Jan 20 09:44:14--
controller.go:493] Waiting for pods controller to sync, requeuing ds ingress-apis
controller.go:493] Waiting for pods controller to sync, requeuing ds ingress-apis
controller.go:493] Waiting for pods controller to sync, requeuing ds ingress-apis
controller.go:493] Waiting for pods controller to sync, requeuing ds ingress-apis
controller.go:493] Waiting for pods controller to sync, requeuing ds ingress-apis
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"4b05bf3e-9c18-11e5-b4d2-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"63618203", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-0svoi
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"4b05bf3e-9c18-11e5-b4d2-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"63618203", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-qn8tk
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"4b05bf3e-9c18-11e5-b4d2-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"63618203", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-4p04e
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"4b05bf3e-9c18-11e5-b4d2-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"63618203", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-2ncfy
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"4b05bf3e-9c18-11e5-b4d2-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"63618203", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-v6iuf
--Jan 20 09:44:20--
</code></pre></div>
<hr>
<p dir="auto">Before someone asks, although this is obvious, I solved it by deleting and recreating the <code class="notranslate">ds</code> (identically):</p>
<h2 dir="auto"></h2>
<p dir="auto"><code class="notranslate">kubelet</code> logs on a previously faulty node:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--Jan 20 10:52:33--
kubelet.go:2015] SyncLoop (UPDATE): "ingress-apis-0svoi_default"
kubelet.go:2018] SyncLoop (REMOVE): "ingress-apis-0svoi_default"
kubelet.go:2108] Failed to delete pod "ingress-apis-0svoi_default", err: pod not found
kubelet.go:2012] SyncLoop (ADD): "ingress-apis-9us1a_default"
manager.go:1707] Need to restart pod infra container for "ingress-apis-9us1a_default" because it is not found
--Jan 20 10:52:34--"><pre class="notranslate"><code class="notranslate">--Jan 20 10:52:33--
kubelet.go:2015] SyncLoop (UPDATE): "ingress-apis-0svoi_default"
kubelet.go:2018] SyncLoop (REMOVE): "ingress-apis-0svoi_default"
kubelet.go:2108] Failed to delete pod "ingress-apis-0svoi_default", err: pod not found
kubelet.go:2012] SyncLoop (ADD): "ingress-apis-9us1a_default"
manager.go:1707] Need to restart pod infra container for "ingress-apis-9us1a_default" because it is not found
--Jan 20 10:52:34--
</code></pre></div>
<h2 dir="auto"></h2>
<p dir="auto"><code class="notranslate">kube-controller-manager</code> logs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--Jan 20 10:52:40--
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"ed06f7f4-bf63-11e5-91dc-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"64118991", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-hgcn1
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"ed06f7f4-bf63-11e5-91dc-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"64118991", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-9us1a
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"ed06f7f4-bf63-11e5-91dc-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"64118991", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-lsobz
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"ed06f7f4-bf63-11e5-91dc-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"64118991", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-ogjrw
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"ed06f7f4-bf63-11e5-91dc-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"64118991", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-9tae0
--Jan 20 10:52:41--"><pre class="notranslate"><code class="notranslate">--Jan 20 10:52:40--
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"ed06f7f4-bf63-11e5-91dc-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"64118991", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-hgcn1
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"ed06f7f4-bf63-11e5-91dc-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"64118991", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-9us1a
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"ed06f7f4-bf63-11e5-91dc-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"64118991", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-lsobz
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"ed06f7f4-bf63-11e5-91dc-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"64118991", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-ogjrw
event.go:206] Event(api.ObjectReference{Kind:"DaemonSet", Namespace:"default", Name:"ingress-apis", UID:"ed06f7f4-bf63-11e5-91dc-0a59d1e77755", APIVersion:"extensions", ResourceVersion:"64118991", FieldPath:""}): reason: 'SuccessfulCreate' Created pod: ingress-apis-9tae0
--Jan 20 10:52:41--
</code></pre></div> | <p dir="auto"><a href="https://travis-ci.org/GoogleCloudPlatform/kubernetes/jobs/69776608" rel="nofollow">https://travis-ci.org/GoogleCloudPlatform/kubernetes/jobs/69776608</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="panic: test timed out after 5m0s
goroutine 37 [running]:
runtime.panic(0xaef900, 0xc2080aa020)
/usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
testing.func·008()
/usr/local/go/src/pkg/testing/testing.go:629 +0x12e
created by time.goFunc
/usr/local/go/src/pkg/time/sleep.go:121 +0x55
goroutine 16 [chan receive, 2 minutes]:
testing.RunTests(0xee2130, 0x13b34a0, 0x4, 0x4, 0xe3fe01)
/usr/local/go/src/pkg/testing/testing.go:505 +0xbb8
testing.Main(0xee2130, 0x13b34a0, 0x4, 0x4, 0x13e7900, 0x0, 0x0, 0x13e7900, 0x0, 0x0)
/usr/local/go/src/pkg/testing/testing.go:435 +0xa3
main.main()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_testmain.go:105 +0x18c
goroutine 19 [finalizer wait, 5 minutes]:
runtime.park(0x435ff0, 0x13de610, 0x13b8349)
/usr/local/go/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0x13de610, 0x13b8349)
/usr/local/go/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445
goroutine 33 [chan receive]:
github.com/golang/glog.(*loggingT).flushDaemon(0x13e1280)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/Godeps/_workspace/src/github.com/golang/glog/glog.go:879 +0x96
created by github.com/golang/glog.init·1
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/Godeps/_workspace/src/github.com/golang/glog/glog.go:410 +0x2d6
goroutine 17 [syscall, 5 minutes]:
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445
goroutine 52 [select, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).run(0xc20804d1a0, 0xd24260, 0x3, 0xd21a40, 0x3)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:49 +0x3db
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·001()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0xb9
github.com/GoogleCloudPlatform/kubernetes/pkg/util.func·004()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:112 +0x5f
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Until(0xc20804d1c0, 0x12a05f200, 0x0)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:113 +0xbc
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Forever(0xc20804d1c0, 0x12a05f200)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:94 +0x48
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).Elect
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0x1f6
goroutine 49 [select, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).run(0xc20804d0e0, 0xd24260, 0x3, 0xd21a40, 0x3)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:49 +0x3db
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·001()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0xb9
github.com/GoogleCloudPlatform/kubernetes/pkg/util.func·004()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:112 +0x5f
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Until(0xc20804d100, 0x12a05f200, 0x0)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:113 +0xbc
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Forever(0xc20804d100, 0x12a05f200)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:94 +0x48
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).Elect
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0x1f6
goroutine 55 [select, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).run(0xc20804d320, 0xd24260, 0x3, 0xd21a40, 0x3)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:49 +0x3db
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·001()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0xb9
github.com/GoogleCloudPlatform/kubernetes/pkg/util.func·004()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:112 +0x5f
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Until(0xc20804d340, 0x12a05f200, 0x0)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:113 +0xbc
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Forever(0xc20804d340, 0x12a05f200)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:94 +0x48
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).Elect
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0x1f6
goroutine 58 [select, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/pkg/watch.(*Broadcaster).distribute(0xc2080b1110, 0xd372d0, 0x8, 0x7f1745fd6ef0, 0xc208132d20)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch/mux.go:182 +0x3bd
github.com/GoogleCloudPlatform/kubernetes/pkg/watch.(*Broadcaster).loop(0xc2080b1110)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch/mux.go:163 +0xc3
created by github.com/GoogleCloudPlatform/kubernetes/pkg/watch.NewBroadcaster
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch/mux.go:70 +0x127
goroutine 57 [chan receive, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.Test(0xc2080a6750)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/master_test.go:83 +0x306
testing.tRunner(0xc2080a6750, 0x13b34e8)
/usr/local/go/src/pkg/testing/testing.go:422 +0x110
created by testing.RunTests
/usr/local/go/src/pkg/testing/testing.go:504 +0xb46
goroutine 59 [select, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*notifier).serviceLoop(0xc208093b30, 0xc2080977a0)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:105 +0x363
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·005()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:87 +0x90
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.func·008()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:115 +0x5f
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.Until(0x7f174580bec0, 0x0, 0xc2080976e0)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:116 +0xd3
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.Notify(0x7f1745fd7030, 0xc20804d460, 0xd16620, 0x0, 0xd26520, 0x2, 0x7f1745fd7058, 0xc20804d480, 0xc2080976e0)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:87 +0x429
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·006()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/master_test.go:72 +0x145
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.func·007()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:95 +0xaa
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.After
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:97 +0xf7
goroutine 61 [chan send, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*Fake).Elect(0xc20804d460, 0xd16620, 0x0, 0xd26520, 0x2, 0x0, 0x0)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/fake.go:38 +0x23e
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·003()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:45 +0x13c
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.func·008()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:115 +0x5f
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.Until(0x7f1745807f50, 0x0, 0xc2080976e0)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:116 +0xd3
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·004()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:84 +0x14f
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.func·007()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:95 +0xaa
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.After
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:97 +0xf7
goroutine 62 [semacquire, 2 minutes]:
sync.runtime_Syncsemacquire(0xc2080a54d0)
/usr/local/go/src/pkg/runtime/sema.goc:257 +0xc0
sync.(*Cond).Wait(0xc2080a54c0)
/usr/local/go/src/pkg/sync/cond.go:62 +0xb5
sync.*Cond.Wait·fm()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:104 +0x34
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.func·007()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:95 +0xaa
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.After
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:97 +0xf7
FAIL github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election 300.121s"><pre class="notranslate"><code class="notranslate">panic: test timed out after 5m0s
goroutine 37 [running]:
runtime.panic(0xaef900, 0xc2080aa020)
/usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
testing.func·008()
/usr/local/go/src/pkg/testing/testing.go:629 +0x12e
created by time.goFunc
/usr/local/go/src/pkg/time/sleep.go:121 +0x55
goroutine 16 [chan receive, 2 minutes]:
testing.RunTests(0xee2130, 0x13b34a0, 0x4, 0x4, 0xe3fe01)
/usr/local/go/src/pkg/testing/testing.go:505 +0xbb8
testing.Main(0xee2130, 0x13b34a0, 0x4, 0x4, 0x13e7900, 0x0, 0x0, 0x13e7900, 0x0, 0x0)
/usr/local/go/src/pkg/testing/testing.go:435 +0xa3
main.main()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_testmain.go:105 +0x18c
goroutine 19 [finalizer wait, 5 minutes]:
runtime.park(0x435ff0, 0x13de610, 0x13b8349)
/usr/local/go/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0x13de610, 0x13b8349)
/usr/local/go/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445
goroutine 33 [chan receive]:
github.com/golang/glog.(*loggingT).flushDaemon(0x13e1280)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/Godeps/_workspace/src/github.com/golang/glog/glog.go:879 +0x96
created by github.com/golang/glog.init·1
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/Godeps/_workspace/src/github.com/golang/glog/glog.go:410 +0x2d6
goroutine 17 [syscall, 5 minutes]:
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445
goroutine 52 [select, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).run(0xc20804d1a0, 0xd24260, 0x3, 0xd21a40, 0x3)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:49 +0x3db
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·001()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0xb9
github.com/GoogleCloudPlatform/kubernetes/pkg/util.func·004()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:112 +0x5f
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Until(0xc20804d1c0, 0x12a05f200, 0x0)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:113 +0xbc
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Forever(0xc20804d1c0, 0x12a05f200)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:94 +0x48
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).Elect
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0x1f6
goroutine 49 [select, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).run(0xc20804d0e0, 0xd24260, 0x3, 0xd21a40, 0x3)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:49 +0x3db
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·001()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0xb9
github.com/GoogleCloudPlatform/kubernetes/pkg/util.func·004()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:112 +0x5f
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Until(0xc20804d100, 0x12a05f200, 0x0)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:113 +0xbc
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Forever(0xc20804d100, 0x12a05f200)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:94 +0x48
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).Elect
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0x1f6
goroutine 55 [select, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).run(0xc20804d320, 0xd24260, 0x3, 0xd21a40, 0x3)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:49 +0x3db
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·001()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0xb9
github.com/GoogleCloudPlatform/kubernetes/pkg/util.func·004()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:112 +0x5f
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Until(0xc20804d340, 0x12a05f200, 0x0)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:113 +0xbc
github.com/GoogleCloudPlatform/kubernetes/pkg/util.Forever(0xc20804d340, 0x12a05f200)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:94 +0x48
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*etcdMasterElector).Elect
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/etcd_master.go:37 +0x1f6
goroutine 58 [select, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/pkg/watch.(*Broadcaster).distribute(0xc2080b1110, 0xd372d0, 0x8, 0x7f1745fd6ef0, 0xc208132d20)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch/mux.go:182 +0x3bd
github.com/GoogleCloudPlatform/kubernetes/pkg/watch.(*Broadcaster).loop(0xc2080b1110)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch/mux.go:163 +0xc3
created by github.com/GoogleCloudPlatform/kubernetes/pkg/watch.NewBroadcaster
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch/mux.go:70 +0x127
goroutine 57 [chan receive, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.Test(0xc2080a6750)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/master_test.go:83 +0x306
testing.tRunner(0xc2080a6750, 0x13b34e8)
/usr/local/go/src/pkg/testing/testing.go:422 +0x110
created by testing.RunTests
/usr/local/go/src/pkg/testing/testing.go:504 +0xb46
goroutine 59 [select, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*notifier).serviceLoop(0xc208093b30, 0xc2080977a0)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:105 +0x363
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·005()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:87 +0x90
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.func·008()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:115 +0x5f
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.Until(0x7f174580bec0, 0x0, 0xc2080976e0)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:116 +0xd3
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.Notify(0x7f1745fd7030, 0xc20804d460, 0xd16620, 0x0, 0xd26520, 0x2, 0x7f1745fd7058, 0xc20804d480, 0xc2080976e0)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:87 +0x429
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·006()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/master_test.go:72 +0x145
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.func·007()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:95 +0xaa
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.After
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:97 +0xf7
goroutine 61 [chan send, 2 minutes]:
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.(*Fake).Elect(0xc20804d460, 0xd16620, 0x0, 0xd26520, 0x2, 0x0, 0x0)
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/fake.go:38 +0x23e
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·003()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:45 +0x13c
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.func·008()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:115 +0x5f
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.Until(0x7f1745807f50, 0x0, 0xc2080976e0)
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:116 +0xd3
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election.func·004()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:84 +0x14f
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.func·007()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:95 +0xaa
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.After
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:97 +0xf7
goroutine 62 [semacquire, 2 minutes]:
sync.runtime_Syncsemacquire(0xc2080a54d0)
/usr/local/go/src/pkg/runtime/sema.goc:257 +0xc0
sync.(*Cond).Wait(0xc2080a54c0)
/usr/local/go/src/pkg/sync/cond.go:62 +0xb5
sync.*Cond.Wait·fm()
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election/_test/_obj_test/master.go:104 +0x34
github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.func·007()
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:95 +0xaa
created by github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime.After
/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime/util.go:97 +0xf7
FAIL github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election 300.121s
</code></pre></div>
<p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jdef/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jdef">@jdef</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/davidopp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/davidopp">@davidopp</a></p> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=mos" rel="nofollow">Mos</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6410?redirect=false" rel="nofollow">SPR-6410</a></strong> and commented</p>
<p dir="auto">Please check <a href="http://forum.springsource.org/showthread.php?t=80800" rel="nofollow">http://forum.springsource.org/showthread.php?t=80800</a></p>
<p dir="auto">RC2 doesn't work with Apache CXF anymore.<br>
I'm sure there are other frameworks out there<br>
which also breaks with RC2.</p>
<p dir="auto">M4 and RC1 didn't have this problem.<br>
Was there an accidental breaking change in RC2?</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 RC2</p>
<p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?t=80800" rel="nofollow">http://forum.springsource.org/showthread.php?t=80800</a></p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398099695" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11078" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11078/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11078">#11078</a> CXF integration broken in Spring 3 RC2 (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398099258" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11032" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11032/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11032">#11032</a> Cannot import bean definitions using classpath*: resource location</li>
</ul>
<p dir="auto">2 votes, 3 watchers</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=glyn" rel="nofollow">Glyn Normington</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8903?redirect=false" rel="nofollow">SPR-8903</a></strong> and commented</p>
<p dir="auto">The planned implementation of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398111111" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12770" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12770/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12770">#12770</a> for Spring 3.2 excludes support for publishing Spring framework bundles to the SpringSource Enterprise Bundle Repository (EBR). The subset of the OSGi community that uses Spring, which includes the communities surrounding the popular Eclipse Virgo and Gemini Blueprint projects, will be impacted if such support is not put in place or some suitable workaround found.</p>
<p dir="auto">The particular value of publishing Spring framework bundles to the EBR is that the EBR captures those bundles' transitive dependencies on "bundleised" versions of 3rd party libraries such as Hibernate which are present in the EBR. If Spring framework 3.2 bundles are omitted from the EBR, then users will need to resort to educated guesswork to determine the correct "bundleised" transitive dependencies.</p>
<p dir="auto">The purpose of this JIRA is to track the work to implement or work around the issue, but also to raise awareness of the issue among the user community and to encourage discussion.</p>
<p dir="auto">Although this feels more like a blocker for the OSGi/Spring community, I have raised it as critical to provide a more balanced view from the perspective of the much larger Spring community.</p>
<p dir="auto">BTW let's not use this issue to discuss the rationale for switching to Gradle - that's the subject of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398111111" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12770" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12770/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12770">#12770</a>.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.2 M1</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398153308" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14434" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14434/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14434">#14434</a> Migration to gradle build lost OSGi headers (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto">8 votes, 22 watchers</p> | 0 |
<p dir="auto">Got error messages if don't access the body data in POST route. And I guess lost connection.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="127.0.0.1 - - [12/Apr/2022 00:39:05] "POST /good HTTP/1.1" 200 -
127.0.0.1 - - [12/Apr/2022 00:39:13] "POST /bad HTTP/1.1" 200 -
127.0.0.1 - - [12/Apr/2022 00:39:13] code 400, message Bad HTTP/0.9 request type ('{"id":')
127.0.0.1 - - [12/Apr/2022 00:39:13] "None /bad HTTP/0.9" HTTPStatus.BAD_REQUEST -"><pre class="notranslate"><code class="notranslate">127.0.0.1 - - [12/Apr/2022 00:39:05] "POST /good HTTP/1.1" 200 -
127.0.0.1 - - [12/Apr/2022 00:39:13] "POST /bad HTTP/1.1" 200 -
127.0.0.1 - - [12/Apr/2022 00:39:13] code 400, message Bad HTTP/0.9 request type ('{"id":')
127.0.0.1 - - [12/Apr/2022 00:39:13] "None /bad HTTP/0.9" HTTPStatus.BAD_REQUEST -
</code></pre></div>
<p dir="auto">Return data both good, but Bad route do something criminal</p>
<p dir="auto">Example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from flask import Flask, request
app = Flask(__name__)
@app.route('/bad', methods=['POST'])
def bad():
return 'OK'
@app.route('/good', methods=['POST'])
def good():
# j = request.get_json() also works
d = request.data
return 'OK'
if __name__ == "__main__":
app.run(host='127.0.0.1', port=8000, debug=True, use_reloader=False)"><pre class="notranslate"><code class="notranslate">from flask import Flask, request
app = Flask(__name__)
@app.route('/bad', methods=['POST'])
def bad():
return 'OK'
@app.route('/good', methods=['POST'])
def good():
# j = request.get_json() also works
d = request.data
return 'OK'
if __name__ == "__main__":
app.run(host='127.0.0.1', port=8000, debug=True, use_reloader=False)
</code></pre></div>
<p dir="auto">Request 1:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -X POST -H 'Content-Type: application/json' -H 'Connection: keep-alive' -d '{"id": "fo"}' http://127.0.0.1:8000/good -v"><pre class="notranslate"><code class="notranslate">curl -X POST -H 'Content-Type: application/json' -H 'Connection: keep-alive' -d '{"id": "fo"}' http://127.0.0.1:8000/good -v
</code></pre></div>
<p dir="auto">GOOD: no error messages in log</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="127.0.0.1 - - [12/Apr/2022 00:39:05] "POST /good HTTP/1.1" 200 -"><pre class="notranslate"><code class="notranslate">127.0.0.1 - - [12/Apr/2022 00:39:05] "POST /good HTTP/1.1" 200 -
</code></pre></div>
<p dir="auto">Request 2:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -X POST -H 'Content-Type: application/json' -H 'Connection: keep-alive' -d '{"id": "fo"}' http://127.0.0.1:8000/bad -v"><pre class="notranslate"><code class="notranslate">curl -X POST -H 'Content-Type: application/json' -H 'Connection: keep-alive' -d '{"id": "fo"}' http://127.0.0.1:8000/bad -v
</code></pre></div>
<p dir="auto">BAD:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="127.0.0.1 - - [12/Apr/2022 00:39:13] "POST /bad HTTP/1.1" 200 -
127.0.0.1 - - [12/Apr/2022 00:39:13] code 400, message Bad HTTP/0.9 request type ('{"id":')
127.0.0.1 - - [12/Apr/2022 00:39:13] "None /bad HTTP/0.9" HTTPStatus.BAD_REQUEST -"><pre class="notranslate"><code class="notranslate">127.0.0.1 - - [12/Apr/2022 00:39:13] "POST /bad HTTP/1.1" 200 -
127.0.0.1 - - [12/Apr/2022 00:39:13] code 400, message Bad HTTP/0.9 request type ('{"id":')
127.0.0.1 - - [12/Apr/2022 00:39:13] "None /bad HTTP/0.9" HTTPStatus.BAD_REQUEST -
</code></pre></div>
<p dir="auto">Environment:</p>
<ul dir="auto">
<li>Python version: 3.8.0</li>
<li>Flask version: Flask 2.1.1, Werkzeug 2.1.1</li>
</ul> | <p dir="auto">With the following example:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from flask import Flask
app = Flask(__name__)
@app.route('/', methods=['POST'])
def hello_world():
return 'Hello World!'
if __name__ == '__main__':
app.run()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">flask</span> <span class="pl-k">import</span> <span class="pl-v">Flask</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Flask</span>(<span class="pl-s1">__name__</span>)
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">route</span>(<span class="pl-s">'/'</span>, <span class="pl-s1">methods</span><span class="pl-c1">=</span>[<span class="pl-s">'POST'</span>])</span>
<span class="pl-k">def</span> <span class="pl-en">hello_world</span>():
<span class="pl-k">return</span> <span class="pl-s">'Hello World!'</span>
<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>:
<span class="pl-s1">app</span>.<span class="pl-en">run</span>()</pre></div>
<p dir="auto">When you set the request body to <code class="notranslate">{}</code> with Postman or any HTTP clients, the first request will return 200, while the second request will return a 405 error response. The log shows the request method is <code class="notranslate">{}POST</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""{}POST / HTTP/1.1" 405"><pre class="notranslate"><code class="notranslate">"{}POST / HTTP/1.1" 405
</code></pre></div>
<p dir="auto">Notice the request body became the part of the request method.</p> | 1 |
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => 3.4 branch ( <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/opencv/opencv/commit/0101fa789cde6c03bc58288a56e1d6ce7175cd48/hovercard" href="https://github.com/opencv/opencv/commit/0101fa789cde6c03bc58288a56e1d6ce7175cd48"><tt>0101fa7</tt></a> )</li>
<li>Operating System / Platform => Windows 10 64bit</li>
<li>Compiler => Visual Studio 2015</li>
<li>CUDA => 10.0</li>
</ul>
<h5 dir="auto">Summarized description</h5>
<ul dir="auto">
<li>The <code class="notranslate">opencv_test_imgproc</code> passes, but when I ran it from target <code class="notranslate">RUN_TESTS</code>, it says <code class="notranslate">Segfault</code></li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Start 9: opencv_test_imgproc
1/1 Test #9: opencv_test_imgproc ..............***Exception: SegFault137.81 sec"><pre class="notranslate"><code class="notranslate"> Start 9: opencv_test_imgproc
1/1 Test #9: opencv_test_imgproc ..............***Exception: SegFault137.81 sec
</code></pre></div>
<ul dir="auto">
<li>I ran <code class="notranslate">opencv_test_imgproc</code> separately, but all the test passes (!)</li>
<li>To reproduce what gtest was seeing, I need to ran it in Debug mode</li>
<li>When running <code class="notranslate">opencv_test_imgproc</code> with "Start debug" on Visual Studio 2015, the test passed but at the end, it did cause an <code class="notranslate">Segfault</code> at <a href="https://github.com/opencv/opencv/blob/0101fa789cde6c03bc58288a56e1d6ce7175cd48/modules/core/src/ocl.cpp#L4328">ocl.cpp</a><br>
<div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/opencv/opencv/blob/0101fa789cde6c03bc58288a56e1d6ce7175cd48/modules/core/src/ocl.cpp#L4322-L4329">opencv/modules/core/src/ocl.cpp</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 4322 to 4329
in
<a data-pjax="true" class="commit-tease-sha" href="/opencv/opencv/commit/0101fa789cde6c03bc58288a56e1d6ce7175cd48">0101fa7</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L4322" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="4322"></td>
<td id="LC4322" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">void</span> <span class="pl-en">_releaseBufferEntry</span>(<span class="pl-k">const</span> BufferEntry& entry) </td>
</tr>
<tr class="border-0">
<td id="L4323" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="4323"></td>
<td id="LC4323" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
</tr>
<tr class="border-0">
<td id="L4324" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="4324"></td>
<td id="LC4324" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c1">CV_Assert</span>(entry.<span class="pl-smi">capacity_</span> != <span class="pl-c1">0</span>); </td>
</tr>
<tr class="border-0">
<td id="L4325" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="4325"></td>
<td id="LC4325" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c1">CV_Assert</span>(entry.<span class="pl-smi">clBuffer_</span> != <span class="pl-c1">NULL</span>); </td>
</tr>
<tr class="border-0">
<td id="L4326" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="4326"></td>
<td id="LC4326" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c1">LOG_BUFFER_POOL</span>(<span class="pl-s"><span class="pl-pds">"</span>OpenCL release buffer: %p, %lld (0x%llx) bytes<span class="pl-cce">\n</span><span class="pl-pds">"</span></span>, </td>
</tr>
<tr class="border-0">
<td id="L4327" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="4327"></td>
<td id="LC4327" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> entry.<span class="pl-smi">clBuffer_</span>, (<span class="pl-k">long</span> <span class="pl-k">long</span>)entry.<span class="pl-smi">capacity_</span>, (<span class="pl-k">long</span> <span class="pl-k">long</span>)entry.<span class="pl-smi">capacity_</span>); </td>
</tr>
<tr class="border-0">
<td id="L4328" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="4328"></td>
<td id="LC4328" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c1">CV_OCL_DBG_CHECK</span>(<span class="pl-c1">clReleaseMemObject</span>(entry.<span class="pl-smi">clBuffer_</span>)); </td>
</tr>
<tr class="border-0">
<td id="L4329" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="4329"></td>
<td id="LC4329" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
</tbody></table>
</div>
</div>
</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<ul dir="auto">
<li>
<p dir="auto">I narrowed down the test case, and the test case was from <code class="notranslate">OCL_ImgProc/CvtColor8u32f</code></p>
</li>
<li>
<p dir="auto">Furthermore, it was related to test of either HSV/Lab/Luv conversion.</p>
</li>
<li>
<p dir="auto">Also, although I put a break point at where it causes <code class="notranslate">Segfault</code>, it doesn't reproduce the situation.</p>
</li>
<li>
<p dir="auto">I have to exit from the <a href="https://github.com/opencv/opencv/blob/0101fa789cde6c03bc58288a56e1d6ce7175cd48/modules/imgproc/test/test_main.cpp">main routine call</a> and it was happening after that exit call. Mysterious...</p>
</li>
<li>
<p dir="auto">After watching the source code, I realized that some of the static <code class="notranslate">UMat</code> was used in a wrong scope, such like <a href="https://github.com/opencv/opencv/blob/0101fa789cde6c03bc58288a56e1d6ce7175cd48/modules/imgproc/src/color_hsv.cpp#L1483-L1486">here </a><br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/opencv/opencv/blob/0101fa789cde6c03bc58288a56e1d6ce7175cd48/modules/imgproc/src/color_hsv.cpp#L1483-L1486">opencv/modules/imgproc/src/color_hsv.cpp</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 1483 to 1486
in
<a data-pjax="true" class="commit-tease-sha" href="/opencv/opencv/commit/0101fa789cde6c03bc58288a56e1d6ce7175cd48">0101fa7</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L1483" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1483"></td>
<td id="LC1483" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
</tr>
<tr class="border-0">
<td id="L1484" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1484"></td>
<td id="LC1484" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">static</span> UMat sdiv_data; </td>
</tr>
<tr class="border-0">
<td id="L1485" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1485"></td>
<td id="LC1485" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">static</span> UMat hdiv_data180; </td>
</tr>
<tr class="border-0">
<td id="L1486" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1486"></td>
<td id="LC1486" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">static</span> UMat hdiv_data256; </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
</li>
<li>
<p dir="auto">These <code class="notranslate">UMat</code> were passed as a <a href="https://github.com/opencv/opencv/blob/0101fa789cde6c03bc58288a56e1d6ce7175cd48/modules/imgproc/src/color_hsv.cpp#L1516-L1521">parameter of the OpenCL kernel</a> but the scope <a href="https://github.com/opencv/opencv/blob/0101fa789cde6c03bc58288a56e1d6ce7175cd48/modules/imgproc/src/color_hsv.cpp#L1519">was closed before</a> it was <a href="https://github.com/opencv/opencv/blob/0101fa789cde6c03bc58288a56e1d6ce7175cd48/modules/imgproc/src/color_hsv.cpp#L1521">actually used</a><br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/opencv/opencv/blob/0101fa789cde6c03bc58288a56e1d6ce7175cd48/modules/imgproc/src/color_hsv.cpp#L1516-L1521">opencv/modules/imgproc/src/color_hsv.cpp</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 1516 to 1521
in
<a data-pjax="true" class="commit-tease-sha" href="/opencv/opencv/commit/0101fa789cde6c03bc58288a56e1d6ce7175cd48">0101fa7</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L1516" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1516"></td>
<td id="LC1516" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> h.<span class="pl-c1">setArg</span>(<span class="pl-c1">ocl::KernelArg::PtrReadOnly</span>(sdiv_data)); </td>
</tr>
<tr class="border-0">
<td id="L1517" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1517"></td>
<td id="LC1517" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> h.<span class="pl-c1">setArg</span>(hrange == <span class="pl-c1">256</span> ? <span class="pl-c1">ocl::KernelArg::PtrReadOnly</span>(hdiv_data256) : </td>
</tr>
<tr class="border-0">
<td id="L1518" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1518"></td>
<td id="LC1518" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c1">ocl::KernelArg::PtrReadOnly</span>(hdiv_data180)); </td>
</tr>
<tr class="border-0">
<td id="L1519" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1519"></td>
<td id="LC1519" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
</tr>
<tr class="border-0">
<td id="L1520" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1520"></td>
<td id="LC1520" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td>
</tr>
<tr class="border-0">
<td id="L1521" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1521"></td>
<td id="LC1521" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> h.<span class="pl-c1">run</span>(); </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
</li>
<li>
<p dir="auto">Looking back the history, it seems that color convert was splitted in <a href="https://github.com/opencv/opencv/commit/0b900b54e54e8cbd19a65cfe69d20838f142e6b3">early 2018</a>, and before the split, the scope was aligned with the actual use.</p>
</li>
<li>
<p dir="auto">I moved the <code class="notranslate">UMat</code> declarations and also, I removed the <code class="notranslate">static</code></p>
</li>
<li>
<p dir="auto">Now the test passed without <code class="notranslate">Segfault</code></p>
</li>
</ul>
<h5 dir="auto">Steps to reproduce</h5>
<ul dir="auto">
<li>
<p dir="auto">Build under environment explained above.</p>
</li>
<li>
<p dir="auto">Run with CUDA 10.0 and run the OpenCL kernel on dGPU</p>
</li>
<li>
<p dir="auto"><code class="notranslate">OPENCV_OPENCL_DEVICE=:dgpu opencv_test_imgproc --gtest_filter=OCL_ImgProc/CvtColor8u32f*</code></p>
</li>
<li>
<p dir="auto">Also, there I'm not sure why this doesn't happen on <code class="notranslate">CPU</code> and <code class="notranslate">igpu</code> on my laptop.</p>
</li>
<li>
<p dir="auto">Still, the scope difference seems bad, so I think it has meaning to fix the scope.</p>
</li>
</ul> | <h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV => recent 3.4 ( <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/opencv/opencv/commit/c2096771cb705097d2203146838bf4ff71a9c774/hovercard" href="https://github.com/opencv/opencv/commit/c2096771cb705097d2203146838bf4ff71a9c774"><tt>c209677</tt></a> )</li>
<li>Operating System / Platform => Jetson Xavier, Jetson TX1, Jetson TX2, Jetson Nano, Firefly RK3399, ODROID-N2 (All Aarch64)</li>
<li>Compiler => GCC 7.4.0</li>
</ul>
<h5 dir="auto">Abstract</h5>
<ul dir="auto">
<li>Another rounding error causes missing count in histogram</li>
<li>This leads to test failure in xphoto module</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">The original issue comes from <code class="notranslate">opencv_test_xphoto</code> which is contrib module.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ./build/bin/opencv_test_xphoto --gtest_filter=*float_min_value
CTEST_FULL_OUTPUT
OpenCV version: 3.4.8-pre
OpenCV VCS version: 3.4.7-189-gc209677
Build type: Release
Compiler: /usr/bin/c++ (ver 7.4.0)
Parallel framework: pthreads
CPU features: NEON FP16
OpenCL is disabled
TEST: Skip tests with tags: 'mem_6gb', 'verylong'
Note: Google Test filter = *float_min_value
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from xphoto_simplecolorbalance
[ RUN ] xphoto_simplecolorbalance.float_min_value
/home/nvidia/opencv_contrib/modules/xphoto/test/simple_color_balance.cpp:197: Failure
The difference between minDst and newMin is 65468.87890625, which exceeds 65536*1e-4, where
minDst evaluates to -65468.87890625,
newMin evaluates to 0, and
65536*1e-4 evaluates to 6.5536000000000003.
[ FAILED ] xphoto_simplecolorbalance.float_min_value (1 ms)
[----------] 1 test from xphoto_simplecolorbalance (1 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (2 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] xphoto_simplecolorbalance.float_min_value
1 FAILED TEST"><pre class="notranslate"><code class="notranslate">$ ./build/bin/opencv_test_xphoto --gtest_filter=*float_min_value
CTEST_FULL_OUTPUT
OpenCV version: 3.4.8-pre
OpenCV VCS version: 3.4.7-189-gc209677
Build type: Release
Compiler: /usr/bin/c++ (ver 7.4.0)
Parallel framework: pthreads
CPU features: NEON FP16
OpenCL is disabled
TEST: Skip tests with tags: 'mem_6gb', 'verylong'
Note: Google Test filter = *float_min_value
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from xphoto_simplecolorbalance
[ RUN ] xphoto_simplecolorbalance.float_min_value
/home/nvidia/opencv_contrib/modules/xphoto/test/simple_color_balance.cpp:197: Failure
The difference between minDst and newMin is 65468.87890625, which exceeds 65536*1e-4, where
minDst evaluates to -65468.87890625,
newMin evaluates to 0, and
65536*1e-4 evaluates to 6.5536000000000003.
[ FAILED ] xphoto_simplecolorbalance.float_min_value (1 ms)
[----------] 1 test from xphoto_simplecolorbalance (1 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (2 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] xphoto_simplecolorbalance.float_min_value
1 FAILED TEST
</code></pre></div>
<p dir="auto">Not only <code class="notranslate">float_min_value</code> but total 3 tests fail.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[==========] 15 tests from 4 test cases ran. (1171 ms total)
[ PASSED ] 12 tests.
[ FAILED ] 3 tests, listed below:
[ FAILED ] xphoto_simplecolorbalance.float_min_value
[ FAILED ] xphoto_simplecolorbalance.float_p
[ FAILED ] xphoto_simplecolorbalance.float_c3"><pre class="notranslate"><code class="notranslate">[==========] 15 tests from 4 test cases ran. (1171 ms total)
[ PASSED ] 12 tests.
[ FAILED ] 3 tests, listed below:
[ FAILED ] xphoto_simplecolorbalance.float_min_value
[ FAILED ] xphoto_simplecolorbalance.float_p
[ FAILED ] xphoto_simplecolorbalance.float_c3
</code></pre></div>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">These tests were added by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="493812478" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv_contrib/issues/2263" data-hovercard-type="pull_request" data-hovercard-url="/opencv/opencv_contrib/pull/2263/hovercard" href="https://github.com/opencv/opencv_contrib/pull/2263">opencv/opencv_contrib#2263</a><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="493812478" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv_contrib/issues/2263" data-hovercard-type="pull_request" data-hovercard-url="/opencv/opencv_contrib/pull/2263/hovercard" href="https://github.com/opencv/opencv_contrib/pull/2263">opencv/opencv_contrib#2263</a> also <a href="https://github.com/opencv/opencv_contrib/pull/2263/files#diff-4865499a75d5cb18c0afb5d1bf869124R92">modified balanceWhiteSimple to use calcHist</a></p>
<p dir="auto">In <a href="https://github.com/opencv/opencv/blob/c2096771cb705097d2203146838bf4ff71a9c774/modules/imgproc/src/histogram.cpp#L862">calcHist</a>, it's computing the bin number <a href="https://github.com/opencv/opencv/blob/c2096771cb705097d2203146838bf4ff71a9c774/modules/imgproc/src/histogram.cpp#L251">here</a><br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/opencv/opencv/blob/c2096771cb705097d2203146838bf4ff71a9c774/modules/imgproc/src/histogram.cpp#L251-L253">opencv/modules/imgproc/src/histogram.cpp</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 251 to 253
in
<a data-pjax="true" class="commit-tease-sha" href="/opencv/opencv/commit/c2096771cb705097d2203146838bf4ff71a9c774">c209677</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L251" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="251"></td>
<td id="LC251" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">int</span> idx = <span class="pl-c1">cvFloor</span>(*p0*a + b); </td>
</tr>
<tr class="border-0">
<td id="L252" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="252"></td>
<td id="LC252" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span>( (<span class="pl-k">unsigned</span>)idx < (<span class="pl-k">unsigned</span>)sz ) </td>
</tr>
<tr class="border-0">
<td id="L253" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="253"></td>
<td id="LC253" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> ((<span class="pl-k">int</span>*)H)[idx]++; </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto">In Release mode + Aarch64, this <code class="notranslate">multiply and add</code> operations are tend to be compiled as <code class="notranslate">fmadd</code> instruction</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fmadd d0, d2, d0, d1"><pre class="notranslate"><code class="notranslate">fmadd d0, d2, d0, d1
</code></pre></div>
<p dir="auto">And this <code class="notranslate">fmadd</code> causes digit loss when the result becomes near to zero.<br>
Following text shows that <code class="notranslate">*p0*a+b</code> is supposed to become 0.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(gdb) p *p0
$22 = 24000
(gdb) p a
$23 = 0.098610877049377668
(gdb) p b
$24 = -2366.6610491850643
(gdb) p *p0*a+b
$25 = 0"><pre class="notranslate"><code class="notranslate">(gdb) p *p0
$22 = 24000
(gdb) p a
$23 = 0.098610877049377668
(gdb) p b
$24 = -2366.6610491850643
(gdb) p *p0*a+b
$25 = 0
</code></pre></div>
<p dir="auto">when the actual computation result becomes negative, not 0.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(gdb) p value
$20 = -2.2115642650533118e-13"><pre class="notranslate"><code class="notranslate">(gdb) p value
$20 = -2.2115642650533118e-13
</code></pre></div>
<p dir="auto">Since we are doing <code class="notranslate">cvFloor</code> on negative value, the result becomes <code class="notranslate">-1</code> and it won't pass the following <code class="notranslate">if</code> condition<br>
</p><div class="Box Box--condensed my-2">
<div class="Box-header f6">
<p class="mb-0 text-bold">
<a href="https://github.com/opencv/opencv/blob/c2096771cb705097d2203146838bf4ff71a9c774/modules/imgproc/src/histogram.cpp#L252-L253">opencv/modules/imgproc/src/histogram.cpp</a>
</p>
<p class="mb-0 color-fg-muted">
Lines 252 to 253
in
<a data-pjax="true" class="commit-tease-sha" href="/opencv/opencv/commit/c2096771cb705097d2203146838bf4ff71a9c774">c209677</a>
</p>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
<table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">
<tbody><tr class="border-0">
<td id="L252" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="252"></td>
<td id="LC252" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span>( (<span class="pl-k">unsigned</span>)idx < (<span class="pl-k">unsigned</span>)sz ) </td>
</tr>
<tr class="border-0">
<td id="L253" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="253"></td>
<td id="LC253" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> ((<span class="pl-k">int</span>*)H)[idx]++; </td>
</tr>
</tbody></table>
</div>
</div>
<br>
This will lead to missing count of pixel.<br>
The cause is same as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="154590824" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv/issues/6536" data-hovercard-type="issue" data-hovercard-url="/opencv/opencv/issues/6536/hovercard" href="https://github.com/opencv/opencv/issues/6536">#6536</a> , it's another headache rounding error.<p></p>
<p dir="auto">Now, my best solution I can imagine is to apply <code class="notranslate">round-to-zero</code> instead of <code class="notranslate">cvFloor</code> inside <code class="notranslate">calcHist</code><br>
Another solution is to modify the parameter of <code class="notranslate">xphoto</code> so the test passes.<br>
I just like to know which way to fix this issue, or if there are any already implemented <code class="notranslate">round-to-zero</code> function in OpenCV (AFAIK, there are only cvFloor, cvRuond and cvCeil).</p> | 0 |
<p dir="auto">As described in the gitter.im channel <a href="https://gitter.im/babel/babel?at=55243a3438224c543c15dbc4" rel="nofollow">7. April 2015 16:12 Uhr</a> ...<br>
Summary:<br>
The <a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/annotation/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/annotation">@annotation</a> doesn't receive hygiene treatment such as other vars do on actually pointing to an import ...</p> | <p dir="auto">Consider this test case:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import {Async} from '../';
@Async
export default class App extends React.Component {
}
@Async
class Nested extends React.Component {
}"><pre class="notranslate"><code class="notranslate">import {Async} from '../';
@Async
export default class App extends React.Component {
}
@Async
class Nested extends React.Component {
}
</code></pre></div>
<p dir="auto">which is compiled by <code class="notranslate">./node_modules/.bin/babel --stage 0 ./babel-bug.js</code> into:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'use strict';
var _classCallCheck = ...
var _inherits = ...
Object.defineProperty(exports, '__esModule', {
value: true
});
var _Async = require('../');
var App = (function (_React$Component) {
function App() {
_classCallCheck(this, App);
if (_React$Component != null) {
_React$Component.apply(this, arguments);
}
}
_inherits(App, _React$Component);
exports.App = App = Async(App) || App;
return App;
})(React.Component);
exports['default'] = App;
var Nested = (function (_React$Component2) {
function Nested() {
_classCallCheck(this, Nested);
if (_React$Component2 != null) {
_React$Component2.apply(this, arguments);
}
}
_inherits(Nested, _React$Component2);
Nested = _Async.Async(Nested) || Nested;
return Nested;
})(React.Component);
module.exports = exports['default'];"><pre class="notranslate"><code class="notranslate">'use strict';
var _classCallCheck = ...
var _inherits = ...
Object.defineProperty(exports, '__esModule', {
value: true
});
var _Async = require('../');
var App = (function (_React$Component) {
function App() {
_classCallCheck(this, App);
if (_React$Component != null) {
_React$Component.apply(this, arguments);
}
}
_inherits(App, _React$Component);
exports.App = App = Async(App) || App;
return App;
})(React.Component);
exports['default'] = App;
var Nested = (function (_React$Component2) {
function Nested() {
_classCallCheck(this, Nested);
if (_React$Component2 != null) {
_React$Component2.apply(this, arguments);
}
}
_inherits(Nested, _React$Component2);
Nested = _Async.Async(Nested) || Nested;
return Nested;
})(React.Component);
module.exports = exports['default'];
</code></pre></div>
<p dir="auto">Now this fails with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" exports.App = App = Async(App) || App;
^
ReferenceError: Async is not defined"><pre class="notranslate"><code class="notranslate"> exports.App = App = Async(App) || App;
^
ReferenceError: Async is not defined
</code></pre></div> | 1 |
<p dir="auto">Issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="208225279" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/8703" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/8703/hovercard" href="https://github.com/electron/electron/issues/8703">#8703</a> describes exactly the problem. It is duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="108162592" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/2895" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/2895/hovercard" href="https://github.com/electron/electron/issues/2895">#2895</a> but is much more clearly described. The problem is that it is closed but is not resolved.</p> | <ul dir="auto">
<li>Electron version: 1.4.15</li>
<li>Operating system: macOS Sierra, Windows 10</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Top level menu items should be hidden when the <code class="notranslate">visible</code> property is false and not be clickable when <code class="notranslate">enabled</code> property is false.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">The <code class="notranslate">visible</code> and <code class="notranslate">enabled</code> properties do not behave correctly on top level menu items. It seems to work correctly for submenu items.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Create a menu with this code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { Menu } = require('electron').remote;
const template = [
{
label: 'Should not be visible',
visible: false,
submenu: [
{
label: 'Should not be visible either',
visible: false
}
]
},
{
label: 'Should not be enabled',
enabled: false,
submenu: [
{
label: 'Should not be enabled either',
enabled: false
}
]
},
];
const menu = Menu.buildFromTemplate(template);
Menu.setApplicationMenu(menu);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> Menu <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">remote</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">template</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">label</span>: <span class="pl-s">'Should not be visible'</span><span class="pl-kos">,</span>
<span class="pl-c1">visible</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-c1">submenu</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">label</span>: <span class="pl-s">'Should not be visible either'</span><span class="pl-kos">,</span>
<span class="pl-c1">visible</span>: <span class="pl-c1">false</span>
<span class="pl-kos">}</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">{</span>
<span class="pl-c1">label</span>: <span class="pl-s">'Should not be enabled'</span><span class="pl-kos">,</span>
<span class="pl-c1">enabled</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-c1">submenu</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">label</span>: <span class="pl-s">'Should not be enabled either'</span><span class="pl-kos">,</span>
<span class="pl-c1">enabled</span>: <span class="pl-c1">false</span>
<span class="pl-kos">}</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">menu</span> <span class="pl-c1">=</span> <span class="pl-v">Menu</span><span class="pl-kos">.</span><span class="pl-en">buildFromTemplate</span><span class="pl-kos">(</span><span class="pl-s1">template</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-v">Menu</span><span class="pl-kos">.</span><span class="pl-en">setApplicationMenu</span><span class="pl-kos">(</span><span class="pl-s1">menu</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Both menu items will still be visible and clickable.</p> | 1 |
<p dir="auto">I setup a global keyboard shortcut as command+space:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" globalShortcut.register('CommandOrControl+Space', function(){
mainWindow.show()
})"><pre class="notranslate"><code class="notranslate"> globalShortcut.register('CommandOrControl+Space', function(){
mainWindow.show()
})
</code></pre></div>
<p dir="auto">This is actually what happens though:</p>
<p dir="auto"><a href="https://www.youtube.com/watch?v=HTN9aIRaLWw" rel="nofollow">https://www.youtube.com/watch?v=HTN9aIRaLWw</a></p>
<p dir="auto">I would expect spotlight search to be disabled.</p> | <h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Problem Description</h3>
<p dir="auto">I need a way to give custom responses directly for some http requests from render process.</p>
<p dir="auto">The page url should not be navigate to another url.</p>
<p dir="auto">The virtual code explains what I want to do. (Electron has no this api.)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="webRequest.filterRequest((req, res, passthrough) => {
if (req.url == 'https://github.com/') {
//res.status(200).sendFile('/path/to/hello.htm');
res.status(200).sendText('HELLO');
} else {
passthrough();
}
})"><pre class="notranslate"><code class="notranslate">webRequest.filterRequest((req, res, passthrough) => {
if (req.url == 'https://github.com/') {
//res.status(200).sendFile('/path/to/hello.htm');
res.status(200).sendText('HELLO');
} else {
passthrough();
}
})
</code></pre></div>
<p dir="auto">When electron run <code class="notranslate">mainWindow.loadURL('https://github.com/')</code>, user can see <code class="notranslate">HELLO</code> instead of github page. But the page's location is still <code class="notranslate">https://github.com/</code></p>
<h3 dir="auto">Proposed Solution</h3>
<h3 dir="auto">Alternatives Considered</h3>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">Currently, <code class="notranslate">webRequest.onBeforeRequest</code> can redirect a request to another url. but cannot send a response directly without change the url.</p> | 0 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18362.295]
Windows Terminal version (if applicable):Windows Terminal (Preview)
Version: 0.5.2661.0
Any other software?
Visual Studio 17 15.9.4"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.295]
Windows Terminal version (if applicable):Windows Terminal (Preview)
Version: 0.5.2661.0
Any other software?
Visual Studio 17 15.9.4
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Run Windows Terminal (Preview)</li>
<li>In drop down menu press Settings</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Showing settings for terminal.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">MS Visual studio is launching with argument /dde instad settings.</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [版本 10.0.18362.239]
Windows Terminal version (if applicable):Windows Terminal (Preview) Version: 0.2.1831.0 (Microsoft Store build)
Any other software?
OpenSSH client: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: [版本 10.0.18362.239]
Windows Terminal version (if applicable):Windows Terminal (Preview) Version: 0.2.1831.0 (Microsoft Store build)
Any other software?
OpenSSH client: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">1.Start an ssh session in a tab(current or new would do) with RSA certificate identification.<br>
2.Close the tab while the ssh is still connected.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The tab should be closed.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The Terminal stops responding and then the typical Windows messagebox for<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/34049745/61882333-e2cbb900-af2a-11e9-9cc3-09088a59fcd5.jpg"><img src="https://user-images.githubusercontent.com/34049745/61882333-e2cbb900-af2a-11e9-9cc3-09088a59fcd5.jpg" alt="Annotation 2019-07-25 222312" style="max-width: 100%;"></a><br>
unresponding apps will show.</p> | 0 |
<p dir="auto"><a href="https://groups.google.com/forum/#!topic/julia-users/8S41r1KjdC4" rel="nofollow">https://groups.google.com/forum/#!topic/julia-users/8S41r1KjdC4</a></p>
<p dir="auto">How about not emitting this warning in the case where the variable name used twice is <code class="notranslate">_</code>? I'm not proposing making <code class="notranslate">_</code> special in any other way – just skipping this warning for it.</p> | <p dir="auto">It'd be convenient to have a designated dummy variable <code class="notranslate">_</code> (actually keyword), which would simply ignore everything stored into it. For example, you often want to deconstruct tuples like so</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a, _, b, _, c = f()"><pre class="notranslate"><code class="notranslate">a, _, b, _, c = f()
</code></pre></div>
<p dir="auto">where the <code class="notranslate">_</code> values are uninteresting. Likewise, one may want to ignore function arguments, like so</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function foo(a, _, b, _, c)
return (a, b, c)
end"><pre class="notranslate"><code class="notranslate">function foo(a, _, b, _, c)
return (a, b, c)
end
</code></pre></div>
<p dir="auto">This is actually a syntax error right now, because two arguments have the same name, which makes sense if you actually want to read their values. The idea here is to instead discard them, and reading the value of <code class="notranslate">_</code> would be a syntax error.</p>
<p dir="auto">In theory, this is purely about code readability: when one sees <code class="notranslate">_</code>, one knows that the value is not used and thus won't need to be thought about any further; OTOH if one sees something else, then the value is probably going to be used further down the line and needs to be kept track of. One also won't need to behold the unsightly output of wetware gensym() implementations in unused function argument names. In practice though, there is also a performance difference with the current compiler:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function f1(x1, x2, x3, x4, x5)
a, _, b, _, c = x1, x2, x3, x4, x5
return (a, b, c)
end
function f2(x1, x2, x3, x4, x5)
return (x1, x3, x5)
end
code_native(f1, (Int, String, Int, Int, Int))
code_native(f2, (Int, String, Int, Int, Int))"><pre class="notranslate"><code class="notranslate">function f1(x1, x2, x3, x4, x5)
a, _, b, _, c = x1, x2, x3, x4, x5
return (a, b, c)
end
function f2(x1, x2, x3, x4, x5)
return (x1, x3, x5)
end
code_native(f1, (Int, String, Int, Int, Int))
code_native(f2, (Int, String, Int, Int, Int))
</code></pre></div>
<p dir="auto">The assembly for f2 is significantly shorter.</p> | 1 |
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>TensorFlow installed from: <code class="notranslate">pip</code></li>
<li>TensorFlow version: <code class="notranslate">tf-nightly-2.0-preview-2.0.0.dev20190513</code></li>
<li>Python version: 3.6.7</li>
</ul>
<p dir="auto"><strong>Describe the current behavior</strong></p>
<p dir="auto">Attempting <code class="notranslate">tf.keras.models.load_model</code> on a <code class="notranslate">Sequential</code> model throws</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ValueError: You are trying to load a weight file containing 2 layers into a model with 0 layers."><pre class="notranslate">ValueError: You are trying to load a weight file containing 2 layers into a model with 0 layers.</pre></div>
<p dir="auto">Might be caused by a <code class="notranslate">layers</code>/<code class="notranslate">_layers</code> mismatch as mentioned <a href="https://github.com/keras-team/keras/issues/10417#issuecomment-418511814" data-hovercard-type="issue" data-hovercard-url="/keras-team/keras/issues/10417/hovercard">here</a>. Not sure if this is the problem but <a href="https://github.com/tensorflow/tensorflow/blob/2c2d508aa2947ede05cfa195139b176d6cdc9056/tensorflow/python/keras/models.py#L218"><code class="notranslate">_clone_sequential_model</code></a> uses <code class="notranslate">model._layers</code> whereas <a href="https://github.com/tensorflow/tensorflow/blob/30f682e776fbcff8d2da3c3cc0e8d12e1b3dde12/tensorflow/python/keras/saving/hdf5_format.py#L104"><code class="notranslate">save_model_to_hdf5</code></a> accesses <code class="notranslate">model.layers</code>.</p>
<p dir="auto"><strong>Minimal example</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import tensorflow as tf
model = tf.keras.Sequential(
[tf.keras.Input(3), tf.keras.layers.Dense(3), tf.keras.layers.Dense(1)]
)
model.compile(loss="mse", optimizer="adam")
model.fit(tf.constant([[1, 2, 3], [4, 5, 6]]), tf.constant([1, 2]))
model.save("model.h5")
restored_model = tf.keras.models.load_model("model.h5")"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span>
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-v">Sequential</span>(
[<span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-v">Input</span>(<span class="pl-c1">3</span>), <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">layers</span>.<span class="pl-v">Dense</span>(<span class="pl-c1">3</span>), <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">layers</span>.<span class="pl-v">Dense</span>(<span class="pl-c1">1</span>)]
)
<span class="pl-s1">model</span>.<span class="pl-en">compile</span>(<span class="pl-s1">loss</span><span class="pl-c1">=</span><span class="pl-s">"mse"</span>, <span class="pl-s1">optimizer</span><span class="pl-c1">=</span><span class="pl-s">"adam"</span>)
<span class="pl-s1">model</span>.<span class="pl-en">fit</span>(<span class="pl-s1">tf</span>.<span class="pl-en">constant</span>([[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>], [<span class="pl-c1">4</span>, <span class="pl-c1">5</span>, <span class="pl-c1">6</span>]]), <span class="pl-s1">tf</span>.<span class="pl-en">constant</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>]))
<span class="pl-s1">model</span>.<span class="pl-en">save</span>(<span class="pl-s">"model.h5"</span>)
<span class="pl-s1">restored_model</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">models</span>.<span class="pl-en">load_model</span>(<span class="pl-s">"model.h5"</span>)</pre></div> | <p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow): <strong>YES</strong></li>
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): <strong>Linux Debian Stable</strong></li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: <strong>N/A</strong></li>
<li>TensorFlow installed from (source or binary): <strong>binary</strong></li>
<li>TensorFlow version (use command below): <strong>CPU, both TF-2.0.0a0 and tf-nightly-2.0-preview-2.0.0.dev20190315</strong></li>
<li>Python version: <strong>3.5.3</strong></li>
<li>Bazel version (if compiling from source): <strong>N/A</strong></li>
<li>GCC/Compiler version (if compiling from source): <strong>N/A</strong></li>
<li>CUDA/cuDNN version: <strong>N/A</strong></li>
<li>GPU model and memory: <strong>N/A</strong></li>
</ul>
<p dir="auto"><strong>Describe the current behavior</strong><br>
When a <code class="notranslate">Sequential</code> Keras model contains <code class="notranslate">InputLayer</code> and it is saved, it cannot be loaded and fails with a message</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ValueError: You are trying to load a weight file containing 1 layers into a model with 0 layers."><pre class="notranslate"><code class="notranslate">ValueError: You are trying to load a weight file containing 1 layers into a model with 0 layers.
</code></pre></div>
<p dir="auto"><strong>Describe the expected behavior</strong><br>
The model can be loaded correctly.</p>
<p dir="auto"><strong>Code to reproduce the issue</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import tensorflow as tf
inputs = np.arange(10)
outputs = 2 * inputs
model = tf.keras.Sequential([
tf.keras.layers.InputLayer(input_shape=[1]),
tf.keras.layers.Dense(1),
])
model.compile(
optimizer=tf.keras.optimizers.Adam(),
loss=tf.keras.losses.MeanSquaredError(),
metrics=[tf.keras.metrics.MeanSquaredError()]
)
model.fit(inputs, outputs)
model.save("model.h5")
loaded_model = tf.keras.models.load_model("model.h5")"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span>
<span class="pl-s1">inputs</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10</span>)
<span class="pl-s1">outputs</span> <span class="pl-c1">=</span> <span class="pl-c1">2</span> <span class="pl-c1">*</span> <span class="pl-s1">inputs</span>
<span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-v">Sequential</span>([
<span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">layers</span>.<span class="pl-v">InputLayer</span>(<span class="pl-s1">input_shape</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>]),
<span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">layers</span>.<span class="pl-v">Dense</span>(<span class="pl-c1">1</span>),
])
<span class="pl-s1">model</span>.<span class="pl-en">compile</span>(
<span class="pl-s1">optimizer</span><span class="pl-c1">=</span><span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">optimizers</span>.<span class="pl-v">Adam</span>(),
<span class="pl-s1">loss</span><span class="pl-c1">=</span><span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">losses</span>.<span class="pl-v">MeanSquaredError</span>(),
<span class="pl-s1">metrics</span><span class="pl-c1">=</span>[<span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">metrics</span>.<span class="pl-v">MeanSquaredError</span>()]
)
<span class="pl-s1">model</span>.<span class="pl-en">fit</span>(<span class="pl-s1">inputs</span>, <span class="pl-s1">outputs</span>)
<span class="pl-s1">model</span>.<span class="pl-en">save</span>(<span class="pl-s">"model.h5"</span>)
<span class="pl-s1">loaded_model</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">keras</span>.<span class="pl-s1">models</span>.<span class="pl-en">load_model</span>(<span class="pl-s">"model.h5"</span>)</pre></div>
<p dir="auto"><strong>Other info / logs</strong><br>
The problem is in the fact that <code class="notranslate">Sequential.layers</code> does not return the <code class="notranslate">InputLayer</code>. To quote comments from the method:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" def layers(self):
# Historically, `sequential.layers` only returns layers that were added
# via `add`, and omits the auto-generated `InputLayer` that comes at the
# bottom of the stack.
# `Trackable` manages the `_layers` attributes and does filtering
# over it."><pre class="notranslate"> <span class="pl-k">def</span> <span class="pl-en">layers</span>(<span class="pl-s1">self</span>):
<span class="pl-c"># Historically, `sequential.layers` only returns layers that were added</span>
<span class="pl-c"># via `add`, and omits the auto-generated `InputLayer` that comes at the</span>
<span class="pl-c"># bottom of the stack.</span>
<span class="pl-c"># `Trackable` manages the `_layers` attributes and does filtering</span>
<span class="pl-c"># over it.</span></pre></div>
<p dir="auto">The problem is that if <code class="notranslate">InputLayer</code> was added manually with a specified <code class="notranslate">input_shape</code>, then it is an error not to serialize it -- because then the following layers do not know what the input shape is.</p>
<p dir="auto">Workarounds:</p>
<ul dir="auto">
<li>if instead of <code class="notranslate">InputLayer</code> you add <code class="notranslate">input_shape</code> to the <code class="notranslate">Dense</code> layer, it works. However, input <code class="notranslate">dtype</code> cannot be specified in this way and when you pass <code class="notranslate">tf.int32</code> on input, using an <code class="notranslate">InputLayer</code> is required</li>
<li>in Functional API the <code class="notranslate">tf.keras.layers.Input</code> <em>is</em> serialized in the model (and, funnily, as a <code class="notranslate">InputLayer</code>).</li>
</ul>
<p dir="auto">Solutions:</p>
<ul dir="auto">
<li>when serializing a <code class="notranslate">Sequential</code> model, all layers need to be serialized (and no filtering of <code class="notranslate">InputLayer</code> performed).</li>
</ul> | 1 |
<p dir="auto">I'm using react 14.3, babel 6.0.15 and react test utils addon 0.14.6 . Jasmine 2.3 is my testing framework of choice.</p>
<p dir="auto">It seems as though any stateless function component cannot be tested by TestUtils.renderIntoComponent or TestUtils.createRenderer().render(). Either returns null when rendering the function component.</p>
<p dir="auto">Test with any stateless function component and it should yield the same result.</p>
<h2 dir="auto">Component:</h2>
<p dir="auto"><code class="notranslate">import React from 'react';</code></p>
<p dir="auto"><code class="notranslate">const User = ({name, age}) => ( return <div>{name}, {age}</div> );</code></p>
<p dir="auto"><code class="notranslate">module.exports = User;</code></p>
<h2 dir="auto">Test:</h2>
<p dir="auto"><code class="notranslate">expect(TestUtils.renderIntoDocument(<User name={"bob"} age={20} />)).toBeTruthy();</code></p>
<h2 dir="auto">Error:</h2>
<p dir="auto">Expected null to be truthy.</p> | <p dir="auto">In <a href="https://github.com/facebook/react/blob/master/src/shared/utils/PooledClass.js#L18">PooledClass.js</a> we have some static poolers based on the number of arguments & the comment specifies <code class="notranslate">it's not made dynamic so we don't have to use arguments.</code></p>
<p dir="auto">I have 2 questions with this:</p>
<ol dir="auto">
<li>What is the issue with using arguments (i noticed we're using it in other place <a href="https://github.com/facebook/react/blob/master/docs/js/react-dom.js#L8444">reference</a>) if it's going to reduce duplicate code ?</li>
<li>Can't we use the spread syntax for this like this:</li>
</ol>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function nArgumentPooler(...args) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, args);
return instance;
} else {
return new Klass(args);
}
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">nArgumentPooler</span><span class="pl-kos">(</span>...<span class="pl-s1">args</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-v">Klass</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">;</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-v">Klass</span><span class="pl-kos">.</span><span class="pl-c1">instancePool</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">instance</span> <span class="pl-c1">=</span> <span class="pl-v">Klass</span><span class="pl-kos">.</span><span class="pl-c1">instancePool</span><span class="pl-kos">.</span><span class="pl-en">pop</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-v">Klass</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">instance</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">return</span> <span class="pl-s1">instance</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-v">Klass</span><span class="pl-kos">(</span><span class="pl-s1">args</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div> | 0 |
<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ekaradon/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ekaradon">@ekaradon</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.9.2</li>
<li><strong>Node version:</strong> 6.2.0</li>
<li><strong>npm version:</strong> 3.9.3</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"name": "react-es6-webpack-boilerplate",
"version": "4.0.0",
"description": "Boilerplate for kick starting a React Project with ES6 (Babel) and Hot reloader using Webpack.",
"main": "index.js",
"scripts": {
"start": "node server.js",
"build": "BABEL_ENV=production ./node_modules/.bin/webpack --config webpack.config.production.js",
"lint": "./node_modules/.bin/eslint ."
},
"repository": {
"type": "git",
"url": "https://github.com/vasanthk/react-es6-webpack-boilerplate.git"
},
"keywords": [
"react",
"es6",
"babel",
"webpack"
],
"author": "Vasanth Krishnamoorthy (http://www.vasanthk.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/vasanthk/react-es6-webpack-boilerplate/issues"
},
"homepage": "https://github.com/vasanthk/react-es6-webpack-boilerplate",
"dependencies": {
"babel-runtime": "^6.9.2",
"react": "^15.1.0",
"react-dom": "^15.1.0"
},
"devDependencies": {
"babel-core": "6.9.1",
"babel-eslint": "6.0.4",
"babel-loader": "6.2.4",
"babel-plugin-react-transform": "2.0.2",
"babel-plugin-transform-react-constant-elements": "6.9.1",
"babel-plugin-transform-runtime": "6.9.0",
"babel-preset-es2015": "6.9.0",
"babel-preset-react": "6.5.0",
"babel-preset-stage-0": "6.5.0",
"eslint": "2.11.1",
"eslint-plugin-react": "5.1.1",
"react-transform-hmr": "1.0.4",
"webpack": "1.13.1",
"webpack-dev-server": "1.14.1"
}
}"><pre class="notranslate"><code class="notranslate">{
"name": "react-es6-webpack-boilerplate",
"version": "4.0.0",
"description": "Boilerplate for kick starting a React Project with ES6 (Babel) and Hot reloader using Webpack.",
"main": "index.js",
"scripts": {
"start": "node server.js",
"build": "BABEL_ENV=production ./node_modules/.bin/webpack --config webpack.config.production.js",
"lint": "./node_modules/.bin/eslint ."
},
"repository": {
"type": "git",
"url": "https://github.com/vasanthk/react-es6-webpack-boilerplate.git"
},
"keywords": [
"react",
"es6",
"babel",
"webpack"
],
"author": "Vasanth Krishnamoorthy (http://www.vasanthk.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/vasanthk/react-es6-webpack-boilerplate/issues"
},
"homepage": "https://github.com/vasanthk/react-es6-webpack-boilerplate",
"dependencies": {
"babel-runtime": "^6.9.2",
"react": "^15.1.0",
"react-dom": "^15.1.0"
},
"devDependencies": {
"babel-core": "6.9.1",
"babel-eslint": "6.0.4",
"babel-loader": "6.2.4",
"babel-plugin-react-transform": "2.0.2",
"babel-plugin-transform-react-constant-elements": "6.9.1",
"babel-plugin-transform-runtime": "6.9.0",
"babel-preset-es2015": "6.9.0",
"babel-preset-react": "6.5.0",
"babel-preset-stage-0": "6.5.0",
"eslint": "2.11.1",
"eslint-plugin-react": "5.1.1",
"react-transform-hmr": "1.0.4",
"webpack": "1.13.1",
"webpack-dev-server": "1.14.1"
}
}
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
import React, {Component} from 'react';
const data = [1, 2, 3, 4];
function Bar({number}) {
return <div>Number is {number}</div>
}
function Foo({item}) {
function give_number_through_a_fake_function() {
return item;
}
function render_bug() {
return (
<div>
<div>Here the bug</div>
<Bar number={item}/>
</div>
);
}
return (
<div>
The bug will occur
{render_bug()}
</div>
);
}
function render_as_foo(item) {
return <Foo item={item}/>;
}
export default class App extends Component {
render() {
return (
<div>
<h1>Hello, World!</h1>
{data.map(render_as_foo)}
</div>
);
}
}
"><pre class="notranslate"><code class="notranslate">
import React, {Component} from 'react';
const data = [1, 2, 3, 4];
function Bar({number}) {
return <div>Number is {number}</div>
}
function Foo({item}) {
function give_number_through_a_fake_function() {
return item;
}
function render_bug() {
return (
<div>
<div>Here the bug</div>
<Bar number={item}/>
</div>
);
}
return (
<div>
The bug will occur
{render_bug()}
</div>
);
}
function render_as_foo(item) {
return <Foo item={item}/>;
}
export default class App extends Component {
render() {
return (
<div>
<h1>Hello, World!</h1>
{data.map(render_as_foo)}
</div>
);
}
}
</code></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">The props given in the example above (number) are consistently swallowed. They are undefined for the component <code class="notranslate">Bar</code> while it is defined in the component <code class="notranslate">Foo</code>. Furthermore, if using the function <code class="notranslate">give_number_through_a_fake_function</code> is used in order to give the props to the component <code class="notranslate">Bar</code>, then, it is working again.</p>
<p dir="auto">The case is reproducible, I have pushed the full example here:<br>
<a href="https://github.com/ekaradon/react-es6-webpack-boilerplate">https://github.com/ekaradon/react-es6-webpack-boilerplate</a></p> | <h3 dir="auto">Input Code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from 'react'
import ReactDOM from 'react-dom'
const GrandChildComp = ({ text }) => <p>{text}</p>
const ChildComp = ({ text }) => {
const foo = (() => <GrandChildComp text={text} />)()
return <div>{foo}</div>
}
const ParentComp = () => <ChildComp text="Hello World" />
ReactDOM.render(<ParentComp />, document.getElementById('root'))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span>
<span class="pl-k">import</span> <span class="pl-v">ReactDOM</span> <span class="pl-k">from</span> <span class="pl-s">'react-dom'</span>
<span class="pl-k">const</span> <span class="pl-v">GrandChildComp</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> text <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-c1"><</span><span class="pl-ent">p</span><span class="pl-c1">></span><span class="pl-kos">{</span><span class="pl-s1">text</span><span class="pl-kos">}</span><span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">p</span><span class="pl-c1">></span>
<span class="pl-k">const</span> <span class="pl-v">ChildComp</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> text <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-c1"><</span><span class="pl-v">GrandChildComp</span> <span class="pl-c1">text</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">text</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">return</span> <span class="pl-c1"><</span><span class="pl-ent">div</span><span class="pl-c1">></span><span class="pl-kos">{</span><span class="pl-s1">foo</span><span class="pl-kos">}</span><span class="pl-c1"><</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">></span>
<span class="pl-kos">}</span>
<span class="pl-k">const</span> <span class="pl-v">ParentComp</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-c1"><</span><span class="pl-v">ChildComp</span> <span class="pl-c1">text</span><span class="pl-c1">=</span><span class="pl-s">"Hello World"</span> <span class="pl-c1">/</span><span class="pl-c1">></span>
<span class="pl-v">ReactDOM</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-c1"><</span><span class="pl-v">ParentComp</span> <span class="pl-c1">/</span><span class="pl-c1">></span><span class="pl-kos">,</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">'root'</span><span class="pl-kos">)</span><span class="pl-kos">)</span></pre></div>
<h3 dir="auto">Babel Configuration (.bablerc, package.json, cli command)</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"plugins": ["transform-react-constant-elements"],
"presets": ["react", "latest"],
}"><pre class="notranslate"><span class="pl-kos">{</span>
<span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span><span class="pl-s">"transform-react-constant-elements"</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-s">"presets"</span>: <span class="pl-kos">[</span><span class="pl-s">"react"</span><span class="pl-kos">,</span> <span class="pl-s">"latest"</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">or</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="babel src/index.js --presets 'react,latest' --plugins 'transform-react-constant-elements'"><pre class="notranslate">babel src/index.js --presets <span class="pl-s"><span class="pl-pds">'</span>react,latest<span class="pl-pds">'</span></span> --plugins <span class="pl-s"><span class="pl-pds">'</span>transform-react-constant-elements<span class="pl-pds">'</span></span></pre></div>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">React should render <code class="notranslate"><div><p>Hello World</p></div></code></p>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Instead, React renders <code class="notranslate"><div><p></p></div></code></p>
<h3 dir="auto">Context</h3>
<p dir="auto"><code class="notranslate">const foo = (() => <GrandChildComp text={text} />)()</code> gets screwed up here because of parameter destructuring.</p>
<p dir="auto">Here's the important lines: <a href="https://gist.github.com/kaatt/794b7f306449dc605aaec6ff58edb372#file-with-constant-elements-js-L25-L27">https://gist.github.com/kaatt/794b7f306449dc605aaec6ff58edb372#file-with-constant-elements-js-L25-L27</a></p>
<p dir="auto">So, it works fine if you replace <code class="notranslate">const ChildComp = ({ text }) => {</code> with</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const ChildComp = (props) => {
const { text } = props
// ..."><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-v">ChildComp</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span> text <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">props</span>
<span class="pl-c">// ...</span><span class="pl-kos"></span></pre></div>
<h3 dir="auto">Your Environment</h3>
<table role="table">
<thead>
<tr>
<th>software</th>
<th>version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Babel</td>
<td>^6.9.1</td>
</tr>
<tr>
<td>node</td>
<td>6.3.0</td>
</tr>
<tr>
<td>npm</td>
<td>3.10.3</td>
</tr>
</tbody>
</table> | 1 |
<p dir="auto">integration test for consul registry and some logic to fix in consul registry</p>
<ul dir="auto">
<li>I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li>I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: xxx</li>
<li>Operating System version: xxx</li>
<li>Java version: xxx</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>xxx</li>
<li>xxx</li>
<li>xxx</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps?</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | <p dir="auto">The <code class="notranslate">Dubbo version</code> report to registry is 2.0.1 after dubbo 2.5.9 and 2.5.10.</p>
<p dir="auto">It should be the same as the dubbo version i think.</p> | 0 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">The server should respond to requests without error. The server responds fine with NextJS 5.10.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The server responds 'Internal Server Error' to all requests.</p>
<p dir="auto">Below is the stack trace that gets logged to CloudWatch. Note the mix of forward and back slashes in the file path it is trying to resolve. I am running 'next build' (on windows) before deployment and have checked node_modules is also getting deployed.</p>
<p dir="auto"><code class="notranslate">Error: Cannot find module '/var/task/.next/dist/bundles\pages\_error.js' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at _callee$ (/var/task/node_modules/next/dist/server/require.js:87:46) at tryCatch (/var/task/node_modules/regenerator-runtime/runtime.js:62:40) at Generator.invoke [as _invoke] (/var/task/node_modules/regenerator-runtime/runtime.js:296:22) at Generator.prototype.(anonymous function) [as next] (/var/task/node_modules/regenerator-runtime/runtime.js:114:21) at step (/var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:12:30) at _next (/var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:9) code: 'MODULE_NOT_FOUND'</code></p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Deploy NextJS V6 app using an express custom server to Lambda using aws-serverless-express.</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">Works fine with NextJS V5.1.0. I am unable to upgrade to NextJS V6 because of this.</p>
<p dir="auto">next.config.js</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
const withTypescript = require('@zeit/next-typescript');
const withSass = require('@zeit/next-sass');
module.exports = (phase, {defaultConfig}) => {
return withTypescript(withSass({
webpack(config, options) {
return config;
},
publicRuntimeConfig: {
API_HOST: (phase === PHASE_DEVELOPMENT_SERVER) ? 'http://localhost:4000' : 'https://api.xxxx'
}
}));
}"><pre class="notranslate"><code class="notranslate">const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
const withTypescript = require('@zeit/next-typescript');
const withSass = require('@zeit/next-sass');
module.exports = (phase, {defaultConfig}) => {
return withTypescript(withSass({
webpack(config, options) {
return config;
},
publicRuntimeConfig: {
API_HOST: (phase === PHASE_DEVELOPMENT_SERVER) ? 'http://localhost:4000' : 'https://api.xxxx'
}
}));
}
</code></pre></div>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>6.00</td>
</tr>
<tr>
<td>node</td>
<td>8.10</td>
</tr>
<tr>
<td>OS</td>
<td>AWS Linux AMI (Linux kernel version – 4.9.85-38.58.amzn1.x86_64)</td>
</tr>
</tbody>
</table> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">I have custom route something like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" router.get('/feed/:id/subs', async (ctx, next) => {
....
await n.render(ctx.req, ctx.res, '/feed/subs', query)
})"><pre class="notranslate"><code class="notranslate"> router.get('/feed/:id/subs', async (ctx, next) => {
....
await n.render(ctx.req, ctx.res, '/feed/subs', query)
})
</code></pre></div>
<p dir="auto">And in the <code class="notranslate">getInitialProps</code> of page <code class="notranslate">/feed/subs</code> I throw error like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let error = new Error('没有权限')
error.statusCode = 401
throw error"><pre class="notranslate"><code class="notranslate">let error = new Error('没有权限')
error.statusCode = 401
throw error
</code></pre></div>
<p dir="auto">I can have error message shown correctly, but the status code would always 500, I think I should have the ability to change the status code.</p>
<h2 dir="auto">Context</h2>
<p dir="auto">I've tried to change status code after <code class="notranslate">render</code>, but no hope, response is finished after <code class="notranslate">render</code></p>
<h2 dir="auto">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>3.2.2</td>
</tr>
<tr>
<td>node</td>
<td>8.5</td>
</tr>
<tr>
<td>OS</td>
<td>MacOS</td>
</tr>
<tr>
<td>browser</td>
<td>any</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">I've been getting this problem for about 2 versions or more:<br>
<a href="https://www.dropbox.com/s/0yiq384ihyqul5l/atom_bug.mov?dl=0" rel="nofollow">https://www.dropbox.com/s/0yiq384ihyqul5l/atom_bug.mov?dl=0</a></p>
<p dir="auto">Please could you look into it and try fixing it?</p>
<p dir="auto">The files are on a remote drive.<br>
Mac OS X 10.10 (Atom installed at around Beta 1 of Yosemite, and now on release)<br>
Latest version running of Atom</p> | <p dir="auto">I'm trying to remove files/dirs using sidebar, Atom asks if I want to move them to Trash and then nothing happens (files stay in the sidebar and on the disk).</p>
<p dir="auto">This is valid only for files on a network partition, everything is ok with local ones</p>
<p dir="auto">Version: 0.123</p> | 1 |
<p dir="auto"><code class="notranslate">python tests/lax_numpy_indexing_test.py --num_generated_cases=1</code> on Python 3.7 (fresh Anaconda install on a macOS 10.13.6). Numpy version 1.15.4.</p> | <h3 dir="auto">Description</h3>
<p dir="auto">Error message when importing jax. How can I solve it?<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/50226927/229987382-9951175c-51c4-4338-8d9d-4cc0111424f0.png"><img width="879" alt="image" src="https://user-images.githubusercontent.com/50226927/229987382-9951175c-51c4-4338-8d9d-4cc0111424f0.png" style="max-width: 100%;"></a></p>
<p dir="auto">Below is the result of "pip show jax jaxlib".<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/50226927/229987472-02b3f63b-059f-4031-8ac4-a29027ca2dd0.png"><img width="472" alt="image" src="https://user-images.githubusercontent.com/50226927/229987472-02b3f63b-059f-4031-8ac4-a29027ca2dd0.png" style="max-width: 100%;"></a></p>
<h3 dir="auto">What jax/jaxlib version are you using?</h3>
<p dir="auto">jax 0.4.8, jaxlib 0.4.7</p>
<h3 dir="auto">Which accelerator(s) are you using?</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional system info</h3>
<p dir="auto">python - 3.9.16, MacOS 13.0, M1 Pro</p>
<h3 dir="auto">NVIDIA GPU info</h3>
<p dir="auto"><em>No response</em></p> | 0 |
<p dir="auto">glide load cache image in SamsungNote2 ,image view always appear light green background.<br>
glide version is 3.6.1<br>
<a target="_blank" rel="noopener noreferrer" href=""><img src="" alt="Uploading photo.jpg…" style="max-width: 100%;"></a></p> | <p dir="auto">This is the original image:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/784063/8439742/bbe02ae8-1f22-11e5-8676-c7a1d525782d.jpg"><img src="https://cloud.githubusercontent.com/assets/784063/8439742/bbe02ae8-1f22-11e5-8676-c7a1d525782d.jpg" alt="9k_" style="max-width: 100%;"></a></p>
<p dir="auto">This is the image rendered using Glide and ImageView:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/784063/8439751/cd1b0864-1f22-11e5-96c8-f3ee83b75f72.png"><img src="https://cloud.githubusercontent.com/assets/784063/8439751/cd1b0864-1f22-11e5-96c8-f3ee83b75f72.png" alt="screen shot 2015-06-30 at 12 16 04 pm" style="max-width: 100%;"></a></p>
<p dir="auto">I'm already using the ARGB_8888 option with the following initialization code:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="new GlideBuilder(this).setDecodeFormat(DecodeFormat.PREFER_ARGB_8888);"><pre class="notranslate"><span class="pl-k">new</span> <span class="pl-smi">GlideBuilder</span>(<span class="pl-smi">this</span>).<span class="pl-en">setDecodeFormat</span>(<span class="pl-smi">DecodeFormat</span>.<span class="pl-c1">PREFER_ARGB_8888</span>);</pre></div>
<p dir="auto">Switching to Picasso does seem to resolve the problem. What might be wrong here?</p> | 1 |
<p dir="auto">I've run into an issue where creating a RectangleSelector prevents ax.axis('tight') from working properly. I've discovered that when the selector is created, it creates new line objects near coordinate (0,0) on the plot. Though not visible, the axis('tight') respects their presence and will not collapse around the real data. This matters if the real data is far from the origin. This seems like a bug?</p>
<p dir="auto">I could work around it if I could figure out how to set the initial location of the RS line objects.</p> | <h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">RectangleSelector:</p>
<ol dir="auto">
<li>Modifies <code class="notranslate">dataLim</code></li>
<li>This modification seemingly cannot be reverted by removing the patch, or by modifying the patch properties</li>
</ol>
<p dir="auto">Basically I want to be able to use RectangleSelector without it modifying <code class="notranslate">ax.dataLim</code>, because if it does it messes up <code class="notranslate">autoscale</code>.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
from matplotlib.widgets import RectangleSelector
fig, ax = plt.subplots()
lim = ax.dataLim
ax.plot([-0.1, 0.1], [-0.1, 0.1])
assert lim.x0 == lim.y0 == -0.1
assert lim.width == lim.height == 0.2
for kind in ('rect', 'rs'):
if kind == 'rect':
rect = Rectangle((0, 0), 0, 1)
ax.add_patch(rect)
else:
rs = RectangleSelector(ax, lambda x: None)
rect = rs.to_draw
assert isinstance(rect, Rectangle)
ax.relim()
assert lim.x0 == lim.y0 == -0.1
assert lim.width == 0.2
assert lim.height == 1.1
ax.patches.remove(rect)
assert ax.patches == []
ax.relim()
assert lim.height == 0.2, (kind, lim.height)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">patches</span> <span class="pl-k">import</span> <span class="pl-v">Rectangle</span>
<span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">widgets</span> <span class="pl-k">import</span> <span class="pl-v">RectangleSelector</span>
<span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>()
<span class="pl-s1">lim</span> <span class="pl-c1">=</span> <span class="pl-s1">ax</span>.<span class="pl-s1">dataLim</span>
<span class="pl-s1">ax</span>.<span class="pl-en">plot</span>([<span class="pl-c1">-</span><span class="pl-c1">0.1</span>, <span class="pl-c1">0.1</span>], [<span class="pl-c1">-</span><span class="pl-c1">0.1</span>, <span class="pl-c1">0.1</span>])
<span class="pl-k">assert</span> <span class="pl-s1">lim</span>.<span class="pl-s1">x0</span> <span class="pl-c1">==</span> <span class="pl-s1">lim</span>.<span class="pl-s1">y0</span> <span class="pl-c1">==</span> <span class="pl-c1">-</span><span class="pl-c1">0.1</span>
<span class="pl-k">assert</span> <span class="pl-s1">lim</span>.<span class="pl-s1">width</span> <span class="pl-c1">==</span> <span class="pl-s1">lim</span>.<span class="pl-s1">height</span> <span class="pl-c1">==</span> <span class="pl-c1">0.2</span>
<span class="pl-k">for</span> <span class="pl-s1">kind</span> <span class="pl-c1">in</span> (<span class="pl-s">'rect'</span>, <span class="pl-s">'rs'</span>):
<span class="pl-k">if</span> <span class="pl-s1">kind</span> <span class="pl-c1">==</span> <span class="pl-s">'rect'</span>:
<span class="pl-s1">rect</span> <span class="pl-c1">=</span> <span class="pl-v">Rectangle</span>((<span class="pl-c1">0</span>, <span class="pl-c1">0</span>), <span class="pl-c1">0</span>, <span class="pl-c1">1</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">add_patch</span>(<span class="pl-s1">rect</span>)
<span class="pl-k">else</span>:
<span class="pl-s1">rs</span> <span class="pl-c1">=</span> <span class="pl-v">RectangleSelector</span>(<span class="pl-s1">ax</span>, <span class="pl-k">lambda</span> <span class="pl-s1">x</span>: <span class="pl-c1">None</span>)
<span class="pl-s1">rect</span> <span class="pl-c1">=</span> <span class="pl-s1">rs</span>.<span class="pl-s1">to_draw</span>
<span class="pl-k">assert</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">rect</span>, <span class="pl-v">Rectangle</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">relim</span>()
<span class="pl-k">assert</span> <span class="pl-s1">lim</span>.<span class="pl-s1">x0</span> <span class="pl-c1">==</span> <span class="pl-s1">lim</span>.<span class="pl-s1">y0</span> <span class="pl-c1">==</span> <span class="pl-c1">-</span><span class="pl-c1">0.1</span>
<span class="pl-k">assert</span> <span class="pl-s1">lim</span>.<span class="pl-s1">width</span> <span class="pl-c1">==</span> <span class="pl-c1">0.2</span>
<span class="pl-k">assert</span> <span class="pl-s1">lim</span>.<span class="pl-s1">height</span> <span class="pl-c1">==</span> <span class="pl-c1">1.1</span>
<span class="pl-s1">ax</span>.<span class="pl-s1">patches</span>.<span class="pl-en">remove</span>(<span class="pl-s1">rect</span>)
<span class="pl-k">assert</span> <span class="pl-s1">ax</span>.<span class="pl-s1">patches</span> <span class="pl-c1">==</span> []
<span class="pl-s1">ax</span>.<span class="pl-en">relim</span>()
<span class="pl-k">assert</span> <span class="pl-s1">lim</span>.<span class="pl-s1">height</span> <span class="pl-c1">==</span> <span class="pl-c1">0.2</span>, (<span class="pl-s1">kind</span>, <span class="pl-s1">lim</span>.<span class="pl-s1">height</span>)</pre></div>
<p dir="auto">The plain "Rectangle" version passes, but the "RectangleSelector" version does not:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" assert lim.height == 0.2, (kind, lim.height)
AssertionError: ('rs', 1.1)"><pre class="notranslate"><code class="notranslate"> assert lim.height == 0.2, (kind, lim.height)
AssertionError: ('rs', 1.1)
</code></pre></div>
<p dir="auto">And the resulting plot is "stuck" with a minimum autolim y max of 1. I also tried setting properties of the Rectangle patch that's part of the RectangleSelector (xy, width, height) and calling <code class="notranslate">ax.relim()</code> but the bound of <code class="notranslate">1.</code> never decreases.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: Linux x86_64</li>
<li>Matplotlib version: latest <code class="notranslate">master</code></li>
<li>Matplotlib backend: Qt5Agg</li>
<li>Python version: 3.8</li>
</ul> | 1 |
<p dir="auto"><strong>Apologies if this is a duplicate - I was unable to find anything related after a few searches - if it is then please feel free to remove without any warning!</strong></p>
<h1 dir="auto">Description of the new feature/enhancement</h1>
<p dir="auto">Currently in Windows 10, the only way to open the program with a keyboard shortcut is by:</p>
<ul dir="auto">
<li>Opening a run prompt and running <code class="notranslate">shell:AppsFolder</code></li>
<li>Dragging a shortcut to the desktop</li>
<li>Binding keys to this shortcut and leaving it on the desktop</li>
</ul>
<p dir="auto">This clutters the desktop unnecessarily and is brittle in that (I suspect) the folder changes upon update due to the version number in the path (e.g. <code class="notranslate">C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.2.1831.0_x64__8wekyb3d8bbwe\...</code>).</p>
<h1 dir="auto">Technical considerations</h1>
<p dir="auto">It would be great if there was a way to bind a key as part of the install process or within the settings file, but I realise this may reasonably be regarded as an OS level concern. I'm stunned that Microsoft doesn't provide a simple way to do this within Windows, but this is not an issue for the Windows Terminal team.</p>
<p dir="auto">I'm sure I could get around this by using something like <code class="notranslate">AutoHotKey</code> though, so I guess we just need a way to reliably derive the path of the application...</p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
`Microsoft Windows [Version 10.0.18999.1]`
Windows Terminal version (if applicable):
`0.5.2762.0`
Any other software?
`ssh`, `cmd`"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
`Microsoft Windows [Version 10.0.18999.1]`
Windows Terminal version (if applicable):
`0.5.2762.0`
Any other software?
`ssh`, `cmd`
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>ssh to an Ubuntu 18.04 host; log in to <code class="notranslate">bash</code> session.</li>
<li>start <code class="notranslate">byobu</code></li>
<li>run command<br>
<code class="notranslate">$ while :; do echo 'All work and no play makes Jack a dull boy.'; done</code></li>
<li>press <code class="notranslate">F2</code> key to create new <code class="notranslate">byobu</code> window</li>
<li>press <code class="notranslate">F3</code> and <code class="notranslate">F4</code> to toggle screens back and forth several times</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Steps 4 and 5 respond quickly.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Steps 4 and 5 can take very long times to process the keystroke and respond.<br>
Sometimes 10, 20, 30 seconds, sometimes immediate.</p>
<p dir="auto">Compare to doing the same process from <code class="notranslate">cmd.exe</code> (in its native window), which responds immediately as expected.</p>
<p dir="auto">Ctrl-C also is sluggish.</p>
<p dir="auto">[edited to correct EB and AB and add Ctrl-C comment]</p> | 0 |
<h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">The ability to override the theme that is used for PowerToys Run. Currently it's only possible to do this in the OS settings.</p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">In terms of UX, very similar to what we have in the General and Shortcut Guide app:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9866362/83720145-cadbc000-a638-11ea-9266-9ff5da515222.png"><img src="https://user-images.githubusercontent.com/9866362/83720145-cadbc000-a638-11ea-9266-9ff5da515222.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto"><strong>crutkas:</strong></p>
<p dir="auto">Should have setting to force theme setting like we do for others.</p>
<hr>
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide a description of the new feature</h2>
<p dir="auto"><em>What is the expected behavior of the proposed feature? What is the scenario this would be used?</em></p>
<p dir="auto">Can theme selection be added to the power toys run?<br>
Currently, it applies the default system theme. An option to switch between dark and light would be great.<br>
But keeping it aside <strong>this application works great</strong>.</p>
<hr>
<p dir="auto">If you'd like to see this feature implemented, add a 👍 reaction to this post.</p> | 1 |
<h2 dir="auto"><g-emoji class="g-emoji" alias="information_source" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png">ℹ</g-emoji> Computer information</h2>
<ul dir="auto">
<li>PowerToys version: 0.20.0</li>
<li>Running PowerToys as Admin: yes</li>
<li>Windows build number: [run "winver"] 1909</li>
</ul>
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide detailed reproduction steps (if any)</h2>
<ol dir="auto">
<li>after rebbot where i installed an update, PT did not start automatic</li>
<li>manually starting PT got the error below</li>
<li>After closing the error, PT was running</li>
</ol>
<p dir="auto">I tried to reproduct the error by closing PT and starting it again, it started without any errors.</p>
<h3 dir="auto"><g-emoji class="g-emoji" alias="heavy_check_mark" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2714.png">✔️</g-emoji> Expected result</h3>
<p dir="auto">PowerToys starts without error messages</p>
<h3 dir="auto"><g-emoji class="g-emoji" alias="x" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/274c.png">❌</g-emoji> Actual result</h3>
<p dir="auto">PowerToys starts with an error shown</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="camera" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4f7.png">📷</g-emoji> Screenshots</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1373936/94402906-f137e500-016c-11eb-95e7-a036311ea011.png"><img src="https://user-images.githubusercontent.com/1373936/94402906-f137e500-016c-11eb-95e7-a036311ea011.png" alt="image" style="max-width: 100%;"></a><br>
<a href="https://github.com/microsoft/PowerToys/files/5290586/2020-09-28.txt">2020-09-28.txt</a></p>
<p dir="auto">Version: 1.0.0<br>
OS Version: Microsoft Windows NT 10.0.18363.0<br>
IntPtr Length: 8<br>
x64: True<br>
Date: 09/28/2020 08:57:35<br>
Exception:<br>
System.ObjectDisposedException: Cannot access a disposed object.<br>
Object name: 'Timer'.<br>
at System.Timers.Timer.set_Enabled(Boolean value)<br>
at System.Timers.Timer.Start()<br>
at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.UpdateIsVisibleCache()<br>
at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br>
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br>
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br>
at System.Windows.Window.SetRootVisual()<br>
at System.Windows.Window.SetRootVisualAndUpdateSTC()<br>
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br>
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br>
at System.Windows.Window.CreateSourceWindowDuringShow()<br>
at System.Windows.Window.SafeCreateWindowDuringShow()<br>
at System.Windows.Window.ShowHelper(Object booleanBox)<br>
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br>
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</p> | <p dir="auto">Popup tells me to give y'all this.</p>
<p dir="auto"><a href="https://github.com/microsoft/PowerToys/files/5009460/2020-07-31.txt">2020-07-31.txt</a></p>
<p dir="auto">Version: 1.0.0<br>
OS Version: Microsoft Windows NT 10.0.19041.0<br>
IntPtr Length: 8<br>
x64: True<br>
Date: 07/31/2020 17:29:59<br>
Exception:<br>
System.ObjectDisposedException: Cannot access a disposed object.<br>
Object name: 'Timer'.<br>
at System.Timers.Timer.set_Enabled(Boolean value)<br>
at System.Timers.Timer.Start()<br>
at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br>
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br>
at System.Windows.UIElement.UpdateIsVisibleCache()<br>
at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br>
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br>
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br>
at System.Windows.Window.SetRootVisual()<br>
at System.Windows.Window.SetRootVisualAndUpdateSTC()<br>
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br>
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br>
at System.Windows.Window.CreateSourceWindowDuringShow()<br>
at System.Windows.Window.SafeCreateWindowDuringShow()<br>
at System.Windows.Window.ShowHelper(Object booleanBox)<br>
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br>
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</p> | 1 |
<p dir="auto">I use <code class="notranslate">Depends()</code> to populate model from query parameters. Recently noticed, that dependency resolving somehow ignores pydantic model configuration. According to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="623996371" data-permission-text="Title is private" data-url="https://github.com/tiangolo/fastapi/issues/1474" data-hovercard-type="issue" data-hovercard-url="/tiangolo/fastapi/issues/1474/hovercard" href="https://github.com/tiangolo/fastapi/issues/1474">#1474</a>, it may be the same issue.</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS: linux</li>
<li>FastAPI Version [e.g. 0.3.0]: 0.61</li>
<li>Python version: 3.8.2</li>
</ul>
<h3 dir="auto">Testcase</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from pydantic import BaseModel, Field
from fastapi import Depends, FastAPI
app = FastAPI()
class TestParams(BaseModel):
class Config:
allow_population_by_field_name = True
param: bool = Field(False, alias='alias')
@app.get('/')
async def main(params: TestParams = Depends()):
return params.dict()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">pydantic</span> <span class="pl-k">import</span> <span class="pl-v">BaseModel</span>, <span class="pl-v">Field</span>
<span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">Depends</span>, <span class="pl-v">FastAPI</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>()
<span class="pl-k">class</span> <span class="pl-v">TestParams</span>(<span class="pl-v">BaseModel</span>):
<span class="pl-k">class</span> <span class="pl-v">Config</span>:
<span class="pl-s1">allow_population_by_field_name</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>
<span class="pl-s1">param</span>: <span class="pl-s1">bool</span> <span class="pl-c1">=</span> <span class="pl-v">Field</span>(<span class="pl-c1">False</span>, <span class="pl-s1">alias</span><span class="pl-c1">=</span><span class="pl-s">'alias'</span>)
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">'/'</span>)</span>
<span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">main</span>(<span class="pl-s1">params</span>: <span class="pl-v">TestParams</span> <span class="pl-c1">=</span> <span class="pl-v">Depends</span>()):
<span class="pl-k">return</span> <span class="pl-s1">params</span>.<span class="pl-en">dict</span>()</pre></div>
<h1 dir="auto">Expected results</h1>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ curl "http://127.0.0.1:8000/?param=true"
{"param":true}
$ curl "http://127.0.0.1:8000/?alias=true"
{"param":true}"><pre class="notranslate">$ curl <span class="pl-s"><span class="pl-pds">"</span>http://127.0.0.1:8000/?param=true<span class="pl-pds">"</span></span>
{<span class="pl-s"><span class="pl-pds">"</span>param<span class="pl-pds">"</span></span>:true}
$ curl <span class="pl-s"><span class="pl-pds">"</span>http://127.0.0.1:8000/?alias=true<span class="pl-pds">"</span></span>
{<span class="pl-s"><span class="pl-pds">"</span>param<span class="pl-pds">"</span></span>:true}</pre></div>
<h1 dir="auto">Actual results</h1>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ curl "http://127.0.0.1:8000/?param=true"
{"param":false}
$ curl "http://127.0.0.1:8000/?alias=true"
{"param":true}"><pre class="notranslate">$ curl <span class="pl-s"><span class="pl-pds">"</span>http://127.0.0.1:8000/?param=true<span class="pl-pds">"</span></span>
{<span class="pl-s"><span class="pl-pds">"</span>param<span class="pl-pds">"</span></span>:false}
$ curl <span class="pl-s"><span class="pl-pds">"</span>http://127.0.0.1:8000/?alias=true<span class="pl-pds">"</span></span>
{<span class="pl-s"><span class="pl-pds">"</span>param<span class="pl-pds">"</span></span>:true}</pre></div> | <h3 dir="auto">First check</h3>
<ul dir="auto">
<li>[ x] I added a very descriptive title to this issue.</li>
<li>[ x] I used the GitHub search to find a similar issue and didn't find it.</li>
<li>[ x] I searched the FastAPI documentation, with the integrated search.</li>
<li>[ x] I already searched in Google "How to X in FastAPI" and didn't find any information.</li>
<li>[ x] I already read and followed all the tutorial in the docs and didn't find an answer.</li>
<li>[ x] I already checked if it is not related to FastAPI but to <a href="https://github.com/samuelcolvin/pydantic">Pydantic</a>.</li>
<li>[ x] I already checked if it is not related to FastAPI but to <a href="https://github.com/swagger-api/swagger-ui">Swagger UI</a>.</li>
<li>[ x] I already checked if it is not related to FastAPI but to <a href="https://github.com/Redocly/redoc">ReDoc</a>.</li>
<li>[ x] After submitting this, I commit to:
<ul dir="auto">
<li>Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.</li>
<li>Or, I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.</li>
<li>Implement a Pull Request for a confirmed bug.</li>
</ul>
</li>
</ul>
<h3 dir="auto">Example</h3>
<p dir="auto">I'm sorry if this is a duplicate or I've missed how to do this. I have scoured the docs and github issues.</p>
<p dir="auto">Here's a self-contained <a href="https://stackoverflow.com/help/minimal-reproducible-example" rel="nofollow">minimal, reproducible, example</a> with my use case:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# URL request: localhost/api/weather/portland?state=OR&country=US&units=imperial
from fastapi import FastAPI
from pydantic import BaseModel
from typing import Optional
import uvicorn
class Location(BaseModel):
city: str
country: Optional[str] = 'US'
state: Optional[str] = None
units: Optional[str] = 'metric'
app = FastAPI()
# What we have is:
@app.get('/api/weather/{city}')
async def weather(city: str,
country: Optional[str] = None,
state: Optional[str] = None,
units: str = 'metric'):
# work with city, country, etc.
return Location(city=city, country=country, state=state, units=units)
# What I want:
# @app.get('/api/weather_binding/{city}')
# async def weather(loc: Location):
# work with loc.city, loc.country, etc.
# Where the binding inputs to the Pydantic model are basically:
# data = {
# **request.query_params,
# **request.headers,
# **dict(await request.form()), # only if the form dependencies are installed
# **request.path_params
# }
# return loc
uvicorn.run(app)"><pre class="notranslate"><span class="pl-c"># URL request: localhost/api/weather/portland?state=OR&country=US&units=imperial</span>
<span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">FastAPI</span>
<span class="pl-k">from</span> <span class="pl-s1">pydantic</span> <span class="pl-k">import</span> <span class="pl-v">BaseModel</span>
<span class="pl-k">from</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">Optional</span>
<span class="pl-k">import</span> <span class="pl-s1">uvicorn</span>
<span class="pl-k">class</span> <span class="pl-v">Location</span>(<span class="pl-v">BaseModel</span>):
<span class="pl-s1">city</span>: <span class="pl-s1">str</span>
<span class="pl-s1">country</span>: <span class="pl-v">Optional</span>[<span class="pl-s1">str</span>] <span class="pl-c1">=</span> <span class="pl-s">'US'</span>
<span class="pl-s1">state</span>: <span class="pl-v">Optional</span>[<span class="pl-s1">str</span>] <span class="pl-c1">=</span> <span class="pl-c1">None</span>
<span class="pl-s1">units</span>: <span class="pl-v">Optional</span>[<span class="pl-s1">str</span>] <span class="pl-c1">=</span> <span class="pl-s">'metric'</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>()
<span class="pl-c"># What we have is:</span>
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">'/api/weather/{city}'</span>)</span>
<span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">weather</span>(<span class="pl-s1">city</span>: <span class="pl-s1">str</span>,
<span class="pl-s1">country</span>: <span class="pl-v">Optional</span>[<span class="pl-s1">str</span>] <span class="pl-c1">=</span> <span class="pl-c1">None</span>,
<span class="pl-s1">state</span>: <span class="pl-v">Optional</span>[<span class="pl-s1">str</span>] <span class="pl-c1">=</span> <span class="pl-c1">None</span>,
<span class="pl-s1">units</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-s">'metric'</span>):
<span class="pl-c"># work with city, country, etc.</span>
<span class="pl-k">return</span> <span class="pl-v">Location</span>(<span class="pl-s1">city</span><span class="pl-c1">=</span><span class="pl-s1">city</span>, <span class="pl-s1">country</span><span class="pl-c1">=</span><span class="pl-s1">country</span>, <span class="pl-s1">state</span><span class="pl-c1">=</span><span class="pl-s1">state</span>, <span class="pl-s1">units</span><span class="pl-c1">=</span><span class="pl-s1">units</span>)
<span class="pl-c"># What I want:</span>
<span class="pl-c"># @app.get('/api/weather_binding/{city}')</span>
<span class="pl-c"># async def weather(loc: Location):</span>
<span class="pl-c"># work with loc.city, loc.country, etc.</span>
<span class="pl-c"># Where the binding inputs to the Pydantic model are basically:</span>
<span class="pl-c"># data = {</span>
<span class="pl-c"># **request.query_params,</span>
<span class="pl-c"># **request.headers,</span>
<span class="pl-c"># **dict(await request.form()), # only if the form dependencies are installed</span>
<span class="pl-c"># **request.path_params</span>
<span class="pl-c"># }</span>
<span class="pl-c"># return loc</span>
<span class="pl-s1">uvicorn</span>.<span class="pl-en">run</span>(<span class="pl-s1">app</span>)</pre></div>
<h3 dir="auto">Description</h3>
<ul dir="auto">
<li>Open the browser and call the endpoint <code class="notranslate">/api/weather/portland?state=OR&country=US&units=imperial</code>.</li>
<li>It returns a JSON:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"city": "portland",
"country": null,
"state": "OR",
"units": "metric"
}"><pre class="notranslate"><code class="notranslate">{
"city": "portland",
"country": null,
"state": "OR",
"units": "metric"
}
</code></pre></div>
<ul dir="auto">
<li>I would like to use model binding just like we have for JSON POST of inbound Pydantic models but combining all these elements.</li>
</ul>
<h3 dir="auto">The solution you would like</h3>
<p dir="auto">Basically, I can do this already with this step:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="data = {
**request.query_params,
**request.headers,
**dict(await request.form()),
**request.path_params
}
loc = Location(**data)"><pre class="notranslate"><code class="notranslate">data = {
**request.query_params,
**request.headers,
**dict(await request.form()),
**request.path_params
}
loc = Location(**data)
</code></pre></div>
<p dir="auto">But that's a drag and having the framework do this, even with an opt in flag in the route (like bind_all=True) would be fantastic.</p>
<h3 dir="auto">Describe alternatives you've considered</h3>
<p dir="auto">I've consider just using the lines of code above more or less on method, but that doesn't seem to fit with the clean automatic nature of the platform.</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS: macOS</li>
<li>FastAPI Version: 0.61.1</li>
<li>Python version: 3.9</li>
</ul>
<h3 dir="auto">Additional context</h3>
<p dir="auto">None</p> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=el_schalo" rel="nofollow">Alexander Schäl</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6480?redirect=false" rel="nofollow">SPR-6480</a></strong> and commented</p>
<p dir="auto">When started via Java6 WebStart, the Spring PathMatchingResourcePatternResolver tries to handle the URLConnection (wich is in a WebStart context actually an JNLPCachedJarURLConnection) just like a normal file URL. The PathMatchingResourcePatternResolver checks the resources only for a JarURLConnection, any other is handled as a path on the local file system.</p>
<p dir="auto">So the resource request for "<a href="http://service.ACME.com:42/webstart/ressources.jar" rel="nofollow">http://service.ACME.com:42/webstart/ressources.jar</a>" (which would be propperly handled by the com.sun.jnlp.JNLPClassLoader) is crippled to "http:\service.ACME.com:42\webstart\ressources.jar", which of course can't be handled by any class loader and logically ends up in an FileNotFoundException due to the destroyed URL syntax.</p>
<p dir="auto">A solution COULD be to extend the URLConnection type checking at the method doFindPathMatchingJarResources of org.springframework.core.io.support.PathMatchingResourcePatternResolver from JarURLConnection to an JNLPCachedJarURLConnection in order to treat this connection not as a "file:"</p>
<p dir="auto">Java WebStart 5 used to cache all resources (especially the JAR files listed as resources in the JNLP file) on the local file system and the PathMatchingResourcePatternResolver could access these JAR files using a local path like "file://path/on/local/system". Java WebStart 6 has got another (obfuscated) cache structure - there are no longer any plain JAR files. That's why the JNLPClassLoader returns JNLPCachedJarURLConnection for any JAR resource instead of JarURLConnection like WebStart 5 did.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.6</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398100187" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11147" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11147/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11147">#11147</a> Spring fails to load ressources via Java Network Launching Protocol (WebStart) since Java6 (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto">4 votes, 4 watchers</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=astefan" rel="nofollow">Andrei Stefan</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3391?redirect=false" rel="nofollow">SPR-3391</a></strong> and commented</p>
<p dir="auto">Using this configuration:<br>
<bean id="parentMockBean" class="test.objects.ParentMockBean"><br>
<property name="mockBean.prop4"><br>
<value>1</value><br>
</property><br>
</bean></p>
<p dir="auto">generates exception using spring.jar 2.0.4. The same error doesn't happen with 2.0.3 spring.jar file.</p>
<p dir="auto">Exception is following:<br>
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'parentMockBean' defined in class path resource [conf/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:<br>
PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.lang.Integer] for property 'mockBean.prop4'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [java.lang.Integer] for property 'prop4': no matching editors or conversion strategy found<br>
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:<br>
PropertyAccessException 1:<br>
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.lang.Integer] for property 'mockBean.prop4'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [java.lang.Integer] for property 'prop4': no matching editors or conversion strategy found<br>
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [java.lang.Integer] for property 'prop4': no matching editors or conversion strategy found<br>
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:227)<br>
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)<br>
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:815)<br>
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:645)<br>
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)<br>
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:835)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)<br>
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)<br>
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:279)<br>
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360)<br>
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91)<br>
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)<br>
at test.main.SimpleTest.main(SimpleTest.java:15)</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.4</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398077000" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8043" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8043/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8043">#8043</a> Error in BeanWrapperImpl.setPropertyValue for nested paths for primitive wrapper types such as integer (<em><strong>"duplicates"</strong></em>)</li>
</ul> | 0 |
<h1 dir="auto">Problem description</h1>
<p dir="auto">Running the deno coverage command against the coverage report of code that printed any unicode character will lead to a panic.</p>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Create a sample file that prints any unicode character, e.g. <code class="notranslate">app.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export function cheers() {
console.log('🍻');
}
cheers();"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">cheers</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'🍻'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">cheers</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Create a simple test that calls the given function, e.g. <code class="notranslate">app.test.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { cheers } from './app.ts'
Deno.test("It should print an emoji", () => {
cheers();
})"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">cheers</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./app.ts'</span>
<span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"It should print an emoji"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-en">cheers</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">Now try to create a coverage report and watch Deno panic.</p>
<h1 dir="auto">Output without backtrace</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[tmp]➡ deno run app.ts
🍻
[tmp]➡ deno test app.test.ts --coverage=cov
🍻
running 1 test from file:///tmp/app.test.ts
test It should print an emoji ...🍻
ok (6ms)
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (64ms)
[tmp]➡ deno coverage cov
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: linux x86_64
Version: 1.19.3
Args: ["deno", "coverage", "cov"]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BadJson(Error("invalid unicode code point", line: 1, column: 280))', cli/tools/coverage/mod.rs:173:57
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[tmp]➡ "><pre lang="log" class="notranslate"><code class="notranslate">[tmp]➡ deno run app.ts
🍻
[tmp]➡ deno test app.test.ts --coverage=cov
🍻
running 1 test from file:///tmp/app.test.ts
test It should print an emoji ...🍻
ok (6ms)
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (64ms)
[tmp]➡ deno coverage cov
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: linux x86_64
Version: 1.19.3
Args: ["deno", "coverage", "cov"]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BadJson(Error("invalid unicode code point", line: 1, column: 280))', cli/tools/coverage/mod.rs:173:57
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[tmp]➡
</code></pre></div>
<h1 dir="auto">Output with backtrace</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[tmp]➡ RUST_BACKTRACE=1 deno coverage cov
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: linux x86_64
Version: 1.19.3
Args: ["deno", "coverage", "cov"]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BadJson(Error("invalid unicode code point", line: 1, column: 280))', cli/tools/coverage/mod.rs:173:57
stack backtrace:
0: rust_begin_unwind
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5
1: core::panicking::panic_fmt
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14
2: core::result::unwrap_failed
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/result.rs:1690:5
3: deno::tools::coverage::cover_files::{{closure}}
4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
5: deno::main::{{closure}}
6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
7: deno_runtime::tokio_util::run_basic
8: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace."><pre lang="log" class="notranslate"><code class="notranslate">[tmp]➡ RUST_BACKTRACE=1 deno coverage cov
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: linux x86_64
Version: 1.19.3
Args: ["deno", "coverage", "cov"]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BadJson(Error("invalid unicode code point", line: 1, column: 280))', cli/tools/coverage/mod.rs:173:57
stack backtrace:
0: rust_begin_unwind
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5
1: core::panicking::panic_fmt
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14
2: core::result::unwrap_failed
at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/result.rs:1690:5
3: deno::tools::coverage::cover_files::{{closure}}
4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
5: deno::main::{{closure}}
6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
7: deno_runtime::tokio_util::run_basic
8: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
</code></pre></div> | <p dir="auto">Hi, I am having an issue where the output of <code class="notranslate">deno coverage</code> appears inaccurate. I was able to narrow it down to a minimal example; instructions below. I hope it is reproducible. The problem goes away if the emojis or the unused function <code class="notranslate">h</code> are removed. Removing a single emoji removes line 2 from the coverage report, but still inaccurately keeps line 3. I have not tested it with other emojis <g-emoji class="g-emoji" alias="relaxed" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/263a.png">☺️</g-emoji></p>
<p dir="auto">This is the <code class="notranslate">mod.ts</code> file:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default function () {
return "📣❓";
}
function h() {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-s">"📣❓"</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">function</span> <span class="pl-en">h</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">This is the <code class="notranslate">mod_test.ts</code> file:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import f from "./mod.ts";
Deno.test("test", () => {
f()
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">f</span> <span class="pl-k">from</span> <span class="pl-s">"./mod.ts"</span><span class="pl-kos">;</span>
<span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"test"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">These are the shell commands:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno test --coverage=.cov
deno coverage .cov
rm -rf .cov"><pre class="notranslate">deno <span class="pl-c1">test</span> --coverage=.cov
deno coverage .cov
rm -rf .cov</pre></div>
<p dir="auto">This is the output of <code class="notranslate">deno coverage</code>. As far as I understand it, line 2 and 3 should be covered:</p>
<div class="highlight highlight-text-adblock notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" cover file:///home/mod.ts ... 25.000% (1/4)
2 | return "📣❓";
3 | }
-----|-----
5 | function h() {}"><pre class="notranslate"> cover file:///home/mod.ts ... 25.000% (1/4)
2 | return "📣❓";
3 | }
-----|-----
5 | function h() {}</pre></div>
<p dir="auto">This is the output of <code class="notranslate">deno --version</code>:</p>
<div class="highlight highlight-text-adblock notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno 1.11.0 (release, x86_64-unknown-linux-gnu)
v8 9.1.269.35
typescript 4.3.2"><pre class="notranslate">deno 1.11.0 (release, x86_64-unknown-linux-gnu)
v8 9.1.269.35
typescript 4.3.2</pre></div> | 1 |
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://github.com/celery/celery/discussions">discussions forum</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have read the relevant section in the<br>
<a href="https://docs.celeryq.dev/en/master/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h1 dir="auto">Steps to Reproduce</h1>
<p dir="auto">I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.</p>
<ul dir="auto">
<li><code class="notranslate">python3 -sBm build -w --no-isolation</code></li>
<li>because I'm calling <code class="notranslate">build</code> with <code class="notranslate">--no-isolation</code> I'm using during all processes only locally installed modules</li>
<li>install .whl file in </install/prefix></li>
<li>run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix></li>
</ul>
<p dir="auto">Here is pytest output:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-celery-5.2.6-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-celery-5.2.6-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --ignore t/unit/backends/test_mongodb.py --ignore t/unit/backends/test_mongod.py --ignore t/unit/backends/test_s3.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/celery-5.2.6, configfile: pytest.ini
plugins: subtests-0.7.0, timeout-2.1.0
collected 140 items / 1 error / 7 skipped
================================================================================== ERRORS ==================================================================================
___________________________________________________________ ERROR collecting t/unit/concurrency/test_prefork.py ____________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/concurrency/test_prefork.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
t/unit/concurrency/test_prefork.py:11: in <module>
from celery.concurrency.asynpool import iterate_file_descriptors_safely
celery/concurrency/asynpool.py:29: in <module>
from billiard.compat import buf_t, isblocking, setblocking
E ImportError: cannot import name 'buf_t' from 'billiard.compat' (/usr/lib/python3.8/site-packages/billiard/compat.py)
============================================================================= warnings summary =============================================================================
t/integration/test_canvas.py:39
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_canvas.py:39: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
_flaky = pytest.mark.flaky(reruns=5, reruns_delay=1, cause=is_retryable_exception)
t/integration/test_inspect.py:15
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_inspect.py:15: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
_flaky = pytest.mark.flaky(reruns=5, reruns_delay=2)
t/integration/test_tasks.py:18
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_tasks.py:18: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
_flaky = pytest.mark.flaky(reruns=5, reruns_delay=2)
t/unit/app/test_app.py:919
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_app.py:919: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.masked_modules('multiprocessing.util')
t/unit/app/test_loaders.py:122
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_loaders.py:122: PytestUnknownMarkWarning: Unknown pytest.mark.patched_environ - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.patched_environ('CELERY_CONFIG_MODULE', 'celeryconfig.py')
t/unit/app/test_log.py:187
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_log.py:187: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.masked_modules('billiard.util')
t/unit/backends/test_cache.py:209
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:209: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.masked_modules('pylibmc')
t/unit/backends/test_cache.py:218
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:218: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.masked_modules('pylibmc', 'memcache')
t/unit/backends/test_cache.py:244
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:244: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.masked_modules('pylibmc')
t/unit/backends/test_cache.py:255
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:255: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.masked_modules('pylibmc')
t/unit/backends/test_cassandra.py:28
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:28: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.patched_module(*CASSANDRA_MODULES)
t/unit/backends/test_cassandra.py:40
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:40: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.patched_module(*CASSANDRA_MODULES)
t/unit/backends/test_cassandra.py:63
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:63: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.patched_module(*CASSANDRA_MODULES)
t/unit/backends/test_cassandra.py:69
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:69: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.patched_module(*CASSANDRA_MODULES)
t/unit/backends/test_cassandra.py:100
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:100: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.patched_module(*CASSANDRA_MODULES)
t/unit/fixups/test_django.py:57
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/fixups/test_django.py:57: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.masked_modules('django')
t/unit/fixups/test_django.py:268
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/fixups/test_django.py:268: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.patched_module('django', 'django.db', 'django.core',
t/unit/utils/test_serialization.py:20
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/utils/test_serialization.py:20: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.masked_modules('cPickle')
t/unit/worker/test_autoscale.py:103
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_autoscale.py:103: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.sleepdeprived_patched_module(autoscale)
t/unit/worker/test_autoscale.py:219
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_autoscale.py:219: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.sleepdeprived_patched_module(autoscale)
t/unit/worker/test_worker.py:806
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_worker.py:806: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.sleepdeprived_patched_module(autoscale)
t/unit/worker/test_worker.py:855
/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_worker.py:855: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.sleepdeprived_patched_module(autoscale)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] t/integration/test_backend.py:8: could not import 'azure': No module named 'azure'
SKIPPED [1] t/unit/backends/test_arangodb.py:17: could not import 'pyArango': No module named 'pyArango'
SKIPPED [1] t/unit/backends/test_azureblockblob.py:12: could not import 'azure.storage.blob': No module named 'azure'
SKIPPED [1] t/unit/backends/test_consul.py:7: could not import 'consul': No module named 'consul'
SKIPPED [1] t/unit/backends/test_cosmosdbsql.py:12: could not import 'pydocumentdb': No module named 'pydocumentdb'
SKIPPED [1] t/unit/backends/test_couchbase.py:20: could not import 'couchbase': No module named 'couchbase'
SKIPPED [1] t/unit/backends/test_couchdb.py:18: could not import 'pycouchdb': No module named 'pycouchdb'
ERROR t/unit/concurrency/test_prefork.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================= 7 skipped, 22 warnings, 1 error in 4.90s ================================================================="><pre class="notranslate"><span class="pl-c1">+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-celery-5.2.6-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-celery-5.2.6-2.fc35.x86_64/usr/lib/python3.8/site-packages</span>
<span class="pl-c1">+ /usr/bin/pytest -ra --ignore t/unit/backends/test_mongodb.py --ignore t/unit/backends/test_mongod.py --ignore t/unit/backends/test_s3.py</span>
<span class="pl-c1">=========================================================================== test session starts ============================================================================</span>
<span class="pl-c1">platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0</span>
<span class="pl-c1">rootdir: /home/tkloczko/rpmbuild/BUILD/celery-5.2.6, configfile: pytest.ini</span>
<span class="pl-c1">plugins: subtests-0.7.0, timeout-2.1.0</span>
<span class="pl-c1">collected 140 items / 1 error / 7 skipped</span>
<span class="pl-c1">================================================================================== ERRORS ==================================================================================</span>
<span class="pl-c1">___________________________________________________________ ERROR collecting t/unit/concurrency/test_prefork.py ____________________________________________________________</span>
<span class="pl-c1">ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/concurrency/test_prefork.py'.</span>
<span class="pl-c1">Hint: make sure your test modules/packages have valid Python names.</span>
<span class="pl-c1">Traceback:</span>
<span class="pl-c1">/usr/lib64/python3.8/importlib/__init__.py:127: in import_module</span>
<span class="pl-c1"> return _bootstrap._gcd_import(name[level:], package, level)</span>
<span class="pl-c1">t/unit/concurrency/test_prefork.py:11: in <module></span>
<span class="pl-c1"> from celery.concurrency.asynpool import iterate_file_descriptors_safely</span>
<span class="pl-c1">celery/concurrency/asynpool.py:29: in <module></span>
<span class="pl-c1"> from billiard.compat import buf_t, isblocking, setblocking</span>
<span class="pl-c1">E ImportError: cannot import name 'buf_t' from 'billiard.compat' (/usr/lib/python3.8/site-packages/billiard/compat.py)</span>
<span class="pl-c1">============================================================================= warnings summary =============================================================================</span>
<span class="pl-c1">t/integration/test_canvas.py:39</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_canvas.py:39: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> _flaky = pytest.mark.flaky(reruns=5, reruns_delay=1, cause=is_retryable_exception)</span>
<span class="pl-c1">t/integration/test_inspect.py:15</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_inspect.py:15: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> _flaky = pytest.mark.flaky(reruns=5, reruns_delay=2)</span>
<span class="pl-c1">t/integration/test_tasks.py:18</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/integration/test_tasks.py:18: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> _flaky = pytest.mark.flaky(reruns=5, reruns_delay=2)</span>
<span class="pl-c1">t/unit/app/test_app.py:919</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_app.py:919: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.masked_modules('multiprocessing.util')</span>
<span class="pl-c1">t/unit/app/test_loaders.py:122</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_loaders.py:122: PytestUnknownMarkWarning: Unknown pytest.mark.patched_environ - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.patched_environ('CELERY_CONFIG_MODULE', 'celeryconfig.py')</span>
<span class="pl-c1">t/unit/app/test_log.py:187</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/app/test_log.py:187: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.masked_modules('billiard.util')</span>
<span class="pl-c1">t/unit/backends/test_cache.py:209</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:209: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.masked_modules('pylibmc')</span>
<span class="pl-c1">t/unit/backends/test_cache.py:218</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:218: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.masked_modules('pylibmc', 'memcache')</span>
<span class="pl-c1">t/unit/backends/test_cache.py:244</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:244: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.masked_modules('pylibmc')</span>
<span class="pl-c1">t/unit/backends/test_cache.py:255</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cache.py:255: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.masked_modules('pylibmc')</span>
<span class="pl-c1">t/unit/backends/test_cassandra.py:28</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:28: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.patched_module(*CASSANDRA_MODULES)</span>
<span class="pl-c1">t/unit/backends/test_cassandra.py:40</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:40: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.patched_module(*CASSANDRA_MODULES)</span>
<span class="pl-c1">t/unit/backends/test_cassandra.py:63</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:63: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.patched_module(*CASSANDRA_MODULES)</span>
<span class="pl-c1">t/unit/backends/test_cassandra.py:69</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:69: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.patched_module(*CASSANDRA_MODULES)</span>
<span class="pl-c1">t/unit/backends/test_cassandra.py:100</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/backends/test_cassandra.py:100: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.patched_module(*CASSANDRA_MODULES)</span>
<span class="pl-c1">t/unit/fixups/test_django.py:57</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/fixups/test_django.py:57: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.masked_modules('django')</span>
<span class="pl-c1">t/unit/fixups/test_django.py:268</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/fixups/test_django.py:268: PytestUnknownMarkWarning: Unknown pytest.mark.patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.patched_module('django', 'django.db', 'django.core',</span>
<span class="pl-c1">t/unit/utils/test_serialization.py:20</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/utils/test_serialization.py:20: PytestUnknownMarkWarning: Unknown pytest.mark.masked_modules - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.masked_modules('cPickle')</span>
<span class="pl-c1">t/unit/worker/test_autoscale.py:103</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_autoscale.py:103: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.sleepdeprived_patched_module(autoscale)</span>
<span class="pl-c1">t/unit/worker/test_autoscale.py:219</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_autoscale.py:219: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.sleepdeprived_patched_module(autoscale)</span>
<span class="pl-c1">t/unit/worker/test_worker.py:806</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_worker.py:806: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.sleepdeprived_patched_module(autoscale)</span>
<span class="pl-c1">t/unit/worker/test_worker.py:855</span>
<span class="pl-c1"> /home/tkloczko/rpmbuild/BUILD/celery-5.2.6/t/unit/worker/test_worker.py:855: PytestUnknownMarkWarning: Unknown pytest.mark.sleepdeprived_patched_module - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html</span>
<span class="pl-c1"> @pytest.mark.sleepdeprived_patched_module(autoscale)</span>
<span class="pl-c1">-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html</span>
<span class="pl-c1">========================================================================= short test summary info ==========================================================================</span>
<span class="pl-c1">SKIPPED [1] t/integration/test_backend.py:8: could not import 'azure': No module named 'azure'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_arangodb.py:17: could not import 'pyArango': No module named 'pyArango'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_azureblockblob.py:12: could not import 'azure.storage.blob': No module named 'azure'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_consul.py:7: could not import 'consul': No module named 'consul'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_cosmosdbsql.py:12: could not import 'pydocumentdb': No module named 'pydocumentdb'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_couchbase.py:20: could not import 'couchbase': No module named 'couchbase'</span>
<span class="pl-c1">SKIPPED [1] t/unit/backends/test_couchdb.py:18: could not import 'pycouchdb': No module named 'pycouchdb'</span>
<span class="pl-c1">ERROR t/unit/concurrency/test_prefork.py</span>
<span class="pl-c1">!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</span>
<span class="pl-c1">================================================================= 7 skipped, 22 warnings, 1 error in 4.90s =================================================================</span></pre></div>
<p dir="auto">List of modules installed in build env</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Package Version
----------------------------- -----------------
alabaster 0.7.12
amqp 5.1.1
async-timeout 4.0.2
attrs 21.4.0
Babel 2.10.1
billiard 4.0.0
boto3 1.22.5
botocore 1.25.5
Brlapi 0.8.3
build 0.7.0
certifi 2021.10.8
cffi 1.15.0
charset-normalizer 2.0.12
click 8.1.2
click-didyoumean 0.3.0
codespell 2.1.0
cryptography 36.0.2
cycler 0.11.0
Deprecated 1.2.13
distro 1.7.0
dnspython 2.2.1
docutils 0.17.1
elastic-transport 8.1.2
elasticsearch 8.1.3
eventlet 0.33.0
extras 1.0.0
fixtures 4.0.0
fonttools 4.33.3
future 0.18.2
gevent 21.12.0
gpg 1.17.1-unknown
greenlet 1.1.2
idna 3.3
imagesize 1.3.0
importlib-metadata 4.11.3
iniconfig 1.1.1
Jinja2 3.1.1
jmespath 1.0.0
kiwisolver 1.3.2
kombu 5.2.4
libcomps 0.1.18
louis 3.21.0
MarkupSafe 2.1.1
matplotlib 3.5.1
msgpack 1.0.3
numpy 1.22.3
olefile 0.46
packaging 21.3
pbr 5.8.1
pep517 0.12.0
Pillow 9.1.0
pip 22.0.4
pluggy 1.0.0
ply 3.11
py 1.11.0
pycparser 2.21
Pygments 2.12.0
PyGObject 3.42.1
pyparsing 3.0.8
pytest 7.1.2
pytest-subtests 0.7.0
pytest-timeout 2.1.0
python-dateutil 2.8.2
pytz 2022.1
PyYAML 6.0
redis 4.2.2
requests 2.27.1
rpm 4.17.0
s3transfer 0.5.2
setuptools 62.0.0
six 1.16.0
snowballstemmer 2.2.0
Sphinx 4.5.0
sphinx-celery 2.0.0
sphinx-click 4.0.0
sphinxcontrib-applehelp 1.0.2.dev20220410
sphinxcontrib-devhelp 1.0.2.dev20220410
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1.dev20220410
sphinxcontrib-qthelp 1.0.3.dev20220410
sphinxcontrib-serializinghtml 1.1.5
SQLAlchemy 1.4.36.dev0
testtools 2.5.0
tomli 2.0.1
urllib3 1.26.9
vine 5.0.0
wheel 0.37.1
wrapt 1.14.0
zipp 3.8.0
zope.event 4.5.0
zope.interface 5.4.0"><pre class="notranslate"><span class="pl-c1">Package Version</span>
<span class="pl-c1">----------------------------- -----------------</span>
<span class="pl-c1">alabaster 0.7.12</span>
<span class="pl-c1">amqp 5.1.1</span>
<span class="pl-c1">async-timeout 4.0.2</span>
<span class="pl-c1">attrs 21.4.0</span>
<span class="pl-c1">Babel 2.10.1</span>
<span class="pl-c1">billiard 4.0.0</span>
<span class="pl-c1">boto3 1.22.5</span>
<span class="pl-c1">botocore 1.25.5</span>
<span class="pl-c1">Brlapi 0.8.3</span>
<span class="pl-c1">build 0.7.0</span>
<span class="pl-c1">certifi 2021.10.8</span>
<span class="pl-c1">cffi 1.15.0</span>
<span class="pl-c1">charset-normalizer 2.0.12</span>
<span class="pl-c1">click 8.1.2</span>
<span class="pl-c1">click-didyoumean 0.3.0</span>
<span class="pl-c1">codespell 2.1.0</span>
<span class="pl-c1">cryptography 36.0.2</span>
<span class="pl-c1">cycler 0.11.0</span>
<span class="pl-c1">Deprecated 1.2.13</span>
<span class="pl-c1">distro 1.7.0</span>
<span class="pl-c1">dnspython 2.2.1</span>
<span class="pl-c1">docutils 0.17.1</span>
<span class="pl-c1">elastic-transport 8.1.2</span>
<span class="pl-c1">elasticsearch 8.1.3</span>
<span class="pl-c1">eventlet 0.33.0</span>
<span class="pl-c1">extras 1.0.0</span>
<span class="pl-c1">fixtures 4.0.0</span>
<span class="pl-c1">fonttools 4.33.3</span>
<span class="pl-c1">future 0.18.2</span>
<span class="pl-c1">gevent 21.12.0</span>
<span class="pl-c1">gpg 1.17.1-unknown</span>
<span class="pl-c1">greenlet 1.1.2</span>
<span class="pl-c1">idna 3.3</span>
<span class="pl-c1">imagesize 1.3.0</span>
<span class="pl-c1">importlib-metadata 4.11.3</span>
<span class="pl-c1">iniconfig 1.1.1</span>
<span class="pl-c1">Jinja2 3.1.1</span>
<span class="pl-c1">jmespath 1.0.0</span>
<span class="pl-c1">kiwisolver 1.3.2</span>
<span class="pl-c1">kombu 5.2.4</span>
<span class="pl-c1">libcomps 0.1.18</span>
<span class="pl-c1">louis 3.21.0</span>
<span class="pl-c1">MarkupSafe 2.1.1</span>
<span class="pl-c1">matplotlib 3.5.1</span>
<span class="pl-c1">msgpack 1.0.3</span>
<span class="pl-c1">numpy 1.22.3</span>
<span class="pl-c1">olefile 0.46</span>
<span class="pl-c1">packaging 21.3</span>
<span class="pl-c1">pbr 5.8.1</span>
<span class="pl-c1">pep517 0.12.0</span>
<span class="pl-c1">Pillow 9.1.0</span>
<span class="pl-c1">pip 22.0.4</span>
<span class="pl-c1">pluggy 1.0.0</span>
<span class="pl-c1">ply 3.11</span>
<span class="pl-c1">py 1.11.0</span>
<span class="pl-c1">pycparser 2.21</span>
<span class="pl-c1">Pygments 2.12.0</span>
<span class="pl-c1">PyGObject 3.42.1</span>
<span class="pl-c1">pyparsing 3.0.8</span>
<span class="pl-c1">pytest 7.1.2</span>
<span class="pl-c1">pytest-subtests 0.7.0</span>
<span class="pl-c1">pytest-timeout 2.1.0</span>
<span class="pl-c1">python-dateutil 2.8.2</span>
<span class="pl-c1">pytz 2022.1</span>
<span class="pl-c1">PyYAML 6.0</span>
<span class="pl-c1">redis 4.2.2</span>
<span class="pl-c1">requests 2.27.1</span>
<span class="pl-c1">rpm 4.17.0</span>
<span class="pl-c1">s3transfer 0.5.2</span>
<span class="pl-c1">setuptools 62.0.0</span>
<span class="pl-c1">six 1.16.0</span>
<span class="pl-c1">snowballstemmer 2.2.0</span>
<span class="pl-c1">Sphinx 4.5.0</span>
<span class="pl-c1">sphinx-celery 2.0.0</span>
<span class="pl-c1">sphinx-click 4.0.0</span>
<span class="pl-c1">sphinxcontrib-applehelp 1.0.2.dev20220410</span>
<span class="pl-c1">sphinxcontrib-devhelp 1.0.2.dev20220410</span>
<span class="pl-c1">sphinxcontrib-htmlhelp 2.0.0</span>
<span class="pl-c1">sphinxcontrib-jsmath 1.0.1.dev20220410</span>
<span class="pl-c1">sphinxcontrib-qthelp 1.0.3.dev20220410</span>
<span class="pl-c1">sphinxcontrib-serializinghtml 1.1.5</span>
<span class="pl-c1">SQLAlchemy 1.4.36.dev0</span>
<span class="pl-c1">testtools 2.5.0</span>
<span class="pl-c1">tomli 2.0.1</span>
<span class="pl-c1">urllib3 1.26.9</span>
<span class="pl-c1">vine 5.0.0</span>
<span class="pl-c1">wheel 0.37.1</span>
<span class="pl-c1">wrapt 1.14.0</span>
<span class="pl-c1">zipp 3.8.0</span>
<span class="pl-c1">zope.event 4.5.0</span>
<span class="pl-c1">zope.interface 5.4.0</span></pre></div> | <h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports. (Yeah, the bug's just closed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="481269447" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5678" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5678/hovercard" href="https://github.com/celery/celery/issues/5678">#5678</a> )</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="481269447" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5678" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5678/hovercard" href="https://github.com/celery/celery/issues/5678">#5678</a></li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="481269447" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5678" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5678/hovercard" href="https://github.com/celery/celery/issues/5678">#5678</a></li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: 4.4.0 (cliffs)</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -> celery:4.4.0 (cliffs) kombu:4.6.7 py:3.6.9
billiard:3.6.1.0 py-amqp:2.5.2
platform -> system:Linux arch:64bit, ELF
kernel version:4.15.0-88-generic imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:pyamqp results:rpc://guest:**@localhost:5672//
accept_content: ['json']
broker_url: 'amqp://guest:********@localhost:5672//'
broker_use_ssl: {
'ca_certs': '/home/n0g/certs/privates/home/testca/ca_certificate.pem',
'cert_reqs': <VerifyMode.CERT_OPTIONAL: 1>,
'certfile': '/home/n0g/certs/privates/home/server/server_certificate.pem',
'keyfile': '********',
'ssl_version': <_SSLMethod.PROTOCOL_TLS: 2>}
enable_utc: True
imports:
('*********************',)
os: <module 'os' from '/usr/lib/python3.6/os.py'>
result_backend: 'rpc://guest:********@localhost:5672//'
result_persistent: True
result_serializer: 'json'
ssl: <module 'ssl' from '/usr/lib/python3.6/ssl.py'>
task_annotations: {
'***********************************': { 'rate_limit': '6/h',
'serializer': 'json'}}
task_serializer: 'json'
timezone: 'UTC'
"><pre class="notranslate"><code class="notranslate">software -> celery:4.4.0 (cliffs) kombu:4.6.7 py:3.6.9
billiard:3.6.1.0 py-amqp:2.5.2
platform -> system:Linux arch:64bit, ELF
kernel version:4.15.0-88-generic imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:pyamqp results:rpc://guest:**@localhost:5672//
accept_content: ['json']
broker_url: 'amqp://guest:********@localhost:5672//'
broker_use_ssl: {
'ca_certs': '/home/n0g/certs/privates/home/testca/ca_certificate.pem',
'cert_reqs': <VerifyMode.CERT_OPTIONAL: 1>,
'certfile': '/home/n0g/certs/privates/home/server/server_certificate.pem',
'keyfile': '********',
'ssl_version': <_SSLMethod.PROTOCOL_TLS: 2>}
enable_utc: True
imports:
('*********************',)
os: <module 'os' from '/usr/lib/python3.6/os.py'>
result_backend: 'rpc://guest:********@localhost:5672//'
result_persistent: True
result_serializer: 'json'
ssl: <module 'ssl' from '/usr/lib/python3.6/ssl.py'>
task_annotations: {
'***********************************': { 'rate_limit': '6/h',
'serializer': 'json'}}
task_serializer: 'json'
timezone: 'UTC'
</code></pre></div>
<p dir="auto">But let's try a run output too</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -------------- celery@nginsburg-desktop v4.4.0 (cliffs)
--- ***** -----
-- ******* ---- Linux-4.15.0-88-generic-x86_64-with-Ubuntu-18.04-bionic 2020-02-25 12:53:38
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: __main__:0x7fd0390eb160
- ** ---------- .> transport: amqp://guest:**@localhost:5672//
- ** ---------- .> results: rpc://
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[tasks]
. ***************************
[2020-02-25 12:53:39,235: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:852).
Trying again in 2.00 seconds... (1/100)
"><pre class="notranslate"><code class="notranslate"> -------------- celery@nginsburg-desktop v4.4.0 (cliffs)
--- ***** -----
-- ******* ---- Linux-4.15.0-88-generic-x86_64-with-Ubuntu-18.04-bionic 2020-02-25 12:53:38
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: __main__:0x7fd0390eb160
- ** ---------- .> transport: amqp://guest:**@localhost:5672//
- ** ---------- .> results: rpc://
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[tasks]
. ***************************
[2020-02-25 12:53:39,235: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:852).
Trying again in 2.00 seconds... (1/100)
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<ul dir="auto">
<li>setup rabbitmq for tls</li>
<li>setup a celery app to use rabbitmq and rpc</li>
<li>try to run the celery app</li>
</ul>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.6.9</li>
<li><strong>Minimal Celery Version</strong>: 4.4.0</li>
<li><strong>Minimal Kombu Version</strong>: 4.6.7</li>
<li><strong>Minimal Broker Version</strong>: RabbitMQ 3.8.2</li>
<li><strong>Minimal Result Backend Version</strong>: amqp 2.5.2<br>
al OS and/or Kernel Version**: 4.15.0-88-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="171019" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/88" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/88/hovercard" href="https://github.com/celery/celery/issues/88">#88</a>-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp==2.5.2
APScheduler==3.6.3
asn1crypto==1.3.0
astroid==2.3.3
attrs==19.3.0
bcrypt==3.1.7
billiard==3.6.1.0
blinker==1.4
celery==4.4.0
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
cli-helpers==1.2.1
Click==7.0
configobj==5.0.6
cryptography==2.8
decorator==4.4.1
docopt==0.6.2
enum34==1.1.6
filelock==3.0.12
Flask==1.1.1
Flask-SQLAlchemy==2.4.1
genson==1.1.0
gunicorn==20.0.4
humanize==0.5.1
idna==2.8
importlib-metadata==1.4.0
ipaddress==1.0.23
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.11.0
kafka==1.3.5
kombu==4.6.7
lazy-object-proxy==1.4.3
ldap3==2.6.1
libmfa==1.0.2
MarkupSafe==1.1.1
mccabe==0.6.1
mirakuru==2.1.2
more-itertools==8.2.0
netaddr==0.7.19
ntlm-auth==1.4.0
packaging==20.1
paramiko==2.7.1
pg8000==1.13.2
pgcli==2.2.0
pgspecial==1.11.9
pkg-resources==0.0.0
pluggy==0.13.1
port-for==0.4
prompt-toolkit==2.0.10
psutil==5.6.7
psycopg2==2.8.4
py==1.8.1
pyasn1==0.4.8
pycparser==2.19
Pygments==2.5.2
pylint==2.4.4
pylint-flask-sqlalchemy==0.2.0
PyNaCl==1.3.0
pyOpenSSL==19.1.0
pyparsing==2.4.6
pyproxy==1.0.0
pyrsistent==0.15.7
PySocks==1.7.1
pyTenable==1.0.5
pytest==5.3.5
pytest-postgresql==2.2.1
python-dateutil==2.8.1
pytz==2019.3
PyYAML==5.3
requests==2.22.0
requests-ntlm==1.1.0
scp==0.13.2
scramp==1.1.0
semver==2.9.0
setproctitle==1.1.10
six==1.13.0
SQLAlchemy==1.3.13
SQLAlchemy-Utils==0.36.1
sqlparse==0.3.0
tabulate==0.8.6
terminaltables==3.1.0
testing.common.database==2.0.3
testing.postgresql==1.3.0
toml==0.10.0
tox==3.14.3
typed-ast==1.4.1
tzlocal==2.0.0
urllib3==1.25.8
vine==1.3.0
virtualenv==16.7.9
wcwidth==0.1.8
Werkzeug==0.16.1
wrapt==1.11.2
xmltodict==0.12.0
zipp==2.1.0
"><pre class="notranslate"><code class="notranslate">amqp==2.5.2
APScheduler==3.6.3
asn1crypto==1.3.0
astroid==2.3.3
attrs==19.3.0
bcrypt==3.1.7
billiard==3.6.1.0
blinker==1.4
celery==4.4.0
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
cli-helpers==1.2.1
Click==7.0
configobj==5.0.6
cryptography==2.8
decorator==4.4.1
docopt==0.6.2
enum34==1.1.6
filelock==3.0.12
Flask==1.1.1
Flask-SQLAlchemy==2.4.1
genson==1.1.0
gunicorn==20.0.4
humanize==0.5.1
idna==2.8
importlib-metadata==1.4.0
ipaddress==1.0.23
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.11.0
kafka==1.3.5
kombu==4.6.7
lazy-object-proxy==1.4.3
ldap3==2.6.1
libmfa==1.0.2
MarkupSafe==1.1.1
mccabe==0.6.1
mirakuru==2.1.2
more-itertools==8.2.0
netaddr==0.7.19
ntlm-auth==1.4.0
packaging==20.1
paramiko==2.7.1
pg8000==1.13.2
pgcli==2.2.0
pgspecial==1.11.9
pkg-resources==0.0.0
pluggy==0.13.1
port-for==0.4
prompt-toolkit==2.0.10
psutil==5.6.7
psycopg2==2.8.4
py==1.8.1
pyasn1==0.4.8
pycparser==2.19
Pygments==2.5.2
pylint==2.4.4
pylint-flask-sqlalchemy==0.2.0
PyNaCl==1.3.0
pyOpenSSL==19.1.0
pyparsing==2.4.6
pyproxy==1.0.0
pyrsistent==0.15.7
PySocks==1.7.1
pyTenable==1.0.5
pytest==5.3.5
pytest-postgresql==2.2.1
python-dateutil==2.8.1
pytz==2019.3
PyYAML==5.3
requests==2.22.0
requests-ntlm==1.1.0
scp==0.13.2
scramp==1.1.0
semver==2.9.0
setproctitle==1.1.10
six==1.13.0
SQLAlchemy==1.3.13
SQLAlchemy-Utils==0.36.1
sqlparse==0.3.0
tabulate==0.8.6
terminaltables==3.1.0
testing.common.database==2.0.3
testing.postgresql==1.3.0
toml==0.10.0
tox==3.14.3
typed-ast==1.4.1
tzlocal==2.0.0
urllib3==1.25.8
vine==1.3.0
virtualenv==16.7.9
wcwidth==0.1.8
Werkzeug==0.16.1
wrapt==1.11.2
xmltodict==0.12.0
zipp==2.1.0
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
</p><p dir="auto">rabbitmq.conf</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ssl_options.cacertfile = /home/testca/ca_certificate.pem
ssl_options.certfile = /home/server/server_certificate.pem
ssl_options.keyfile = /home/server/private_key.pem
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = false
ssl_options.versions.1 = tlsv1.2
ssl_options.versions.2 = tlsv1.1
listeners.ssl.default = 5672
listeners.tcp = none
management.ssl.port = 15672
management.ssl.cacertfile = /home/testca/ca_certificate.pem
management.ssl.certfile = /home/server/server_certificate.pem
management.ssl.keyfile = /home/server/private_key.pem
management.ssl.verify = verify_peer
management.ssl.fail_if_no_peer_cert = false"><pre class="notranslate"><code class="notranslate">ssl_options.cacertfile = /home/testca/ca_certificate.pem
ssl_options.certfile = /home/server/server_certificate.pem
ssl_options.keyfile = /home/server/private_key.pem
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = false
ssl_options.versions.1 = tlsv1.2
ssl_options.versions.2 = tlsv1.1
listeners.ssl.default = 5672
listeners.tcp = none
management.ssl.port = 15672
management.ssl.cacertfile = /home/testca/ca_certificate.pem
management.ssl.certfile = /home/server/server_certificate.pem
management.ssl.keyfile = /home/server/private_key.pem
management.ssl.verify = verify_peer
management.ssl.fail_if_no_peer_cert = false
</code></pre></div>
<p dir="auto"></p>
<p dir="auto">
</p><p dir="auto">celeryconfig.py</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import os
import ssl
# pylint: disable=invalid-name
broker_use_ssl = {
# 'keyfile': '/tmp/certs/private_key.pem',
'keyfile': os.path.expanduser('~/certs/privates/home/server/private_key.pem'),
# 'keyfile': '/tmp/certs/privates/home/testca/private/ca_private_key.pem',
'certfile': os.path.expanduser('~/certs/privates/home/server/server_certificate.pem'),
'ca_certs': os.path.expanduser('~/certs/privates/home/testca/ca_certificate.pem'),
'cert_reqs': ssl.CERT_OPTIONAL,
'ssl_version': ssl.PROTOCOL_TLS
}
broker_url = os.environ.get('BROKER_URL', default="pyamqp://guest:guest@localhost:5672//")
result_backend = os.environ.get('RESULT_BACKEND_URL', default="rpc://guest:guest@localhost:5672//")
task_serializer = 'json'
result_serializer = 'json'
accept_content = ['json']
timezone = 'UTC'
enable_utc = True
imports = (
'*****************************',
)
task_annotations = {
'*******************************': {
'rate_limit': '6/h',
'serializer': 'json',
}
}
result_persistent = True"><pre class="notranslate"><code class="notranslate">import os
import ssl
# pylint: disable=invalid-name
broker_use_ssl = {
# 'keyfile': '/tmp/certs/private_key.pem',
'keyfile': os.path.expanduser('~/certs/privates/home/server/private_key.pem'),
# 'keyfile': '/tmp/certs/privates/home/testca/private/ca_private_key.pem',
'certfile': os.path.expanduser('~/certs/privates/home/server/server_certificate.pem'),
'ca_certs': os.path.expanduser('~/certs/privates/home/testca/ca_certificate.pem'),
'cert_reqs': ssl.CERT_OPTIONAL,
'ssl_version': ssl.PROTOCOL_TLS
}
broker_url = os.environ.get('BROKER_URL', default="pyamqp://guest:guest@localhost:5672//")
result_backend = os.environ.get('RESULT_BACKEND_URL', default="rpc://guest:guest@localhost:5672//")
task_serializer = 'json'
result_serializer = 'json'
accept_content = ['json']
timezone = 'UTC'
enable_utc = True
imports = (
'*****************************',
)
task_annotations = {
'*******************************': {
'rate_limit': '6/h',
'serializer': 'json',
}
}
result_persistent = True
</code></pre></div>
<p dir="auto"></p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">I would expect celery to be able to utilize TLSv1.2, so that a connection would be established between celery and rabbitmq over ssl</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">as you can see in the celery output; it is not attempting to communicate over TLS. Which means either the client or the server does not support TLSv1.2. As the default python protocol documentation states <code class="notranslate">Selects the highest protocol version that both the client and server support. Despite the name, this option can select both “SSL” and “TLS” protocols.</code></p>
<p dir="auto">So let's use openssl to checkout what our server supports</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="> openssl s_client -connect localhost:5672
...stuff you don't care about ...
---
New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES256-GCM-SHA384
Session-ID: E44641B94F8A8B6AF58CEC96A2C672C4736B24ACAC7FF690F52FFCC622A8E4B6
Session-ID-ctx:
Master-Key: FC57236B845D281943D0079D1EAFE5AA84A746B59D75787935D2E1921440CFB23C38DD3D21924A78551601CC4FB338B3
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1582652429
Timeout : 7200 (sec)
Verify return code: 19 (self signed certificate in certificate chain)
Extended master secret: no
---
closed"><pre class="notranslate"><code class="notranslate">> openssl s_client -connect localhost:5672
...stuff you don't care about ...
---
New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES256-GCM-SHA384
Session-ID: E44641B94F8A8B6AF58CEC96A2C672C4736B24ACAC7FF690F52FFCC622A8E4B6
Session-ID-ctx:
Master-Key: FC57236B845D281943D0079D1EAFE5AA84A746B59D75787935D2E1921440CFB23C38DD3D21924A78551601CC4FB338B3
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1582652429
Timeout : 7200 (sec)
Verify return code: 19 (self signed certificate in certificate chain)
Extended master secret: no
---
closed
</code></pre></div>
<p dir="auto">Rabbitmq is running with a TLS1.2 listener. So the server is not the issue during this communication. It must be the client.</p>
<p dir="auto">In the related issue it was commented that</p>
<blockquote>
<p dir="auto">You can set the SSL version using broker_use_ssl using the ssl_version key if you are using SNI.<br>
SSL3 shouldn't be the default.</p>
</blockquote>
<p dir="auto">setting <code class="notranslate">ssl_version</code> to <code class="notranslate">ssl.PROTOCOL_TLS</code> or even <code class="notranslate">ssl.PROTOCOL_TLSv1_2</code> still results in SSLv3; so this is not a solution; even though your report says TLS version 2; that's not what is actually used.</p>
<p dir="auto">Also on the linked issue:</p>
<blockquote>
<p dir="auto">However, the error goes away if I change the RabbitMQ config to: {fail_if_no_peer_cert, false}</p>
</blockquote>
<p dir="auto">This is no longer the case. I can hit the RabbitMQ web page with this set from my browser, however celery is still not able to contact the queue. Meaning my browser can communicate with RabbitMQ</p>
<p dir="auto">Turning encryption off allows communication.</p>
<p dir="auto">Please let me know if you need more information.</p> | 0 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
<li>Feature Idea</li>
<li>Documentation Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">user module</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">I have a playbook to create a local user, but when I ran this playbook for two servers, on is RHEL6, the other is RHEL7, why failed on RHEL7, show me the following:</p>
<p dir="auto"><code class="notranslate">fatal: [rht04]: FAILED! => {"changed": false, "failed": true, "msg": "usermod: user 'ansible' does not exist\n", "name": "ansible", "rc": 6}</code></p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: Add ansible local user to the server
user:
name: ansible
uid: 600
comment: "Ansible admin user"
home: /opt/staff/ansible
createhome: yes
state: present"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">Add ansible local user to the server</span>
<span class="pl-ent">user</span>:
<span class="pl-ent">name</span>: <span class="pl-s">ansible</span>
<span class="pl-ent">uid</span>: <span class="pl-c1">600</span>
<span class="pl-ent">comment</span>: <span class="pl-s"><span class="pl-pds">"</span>Ansible admin user<span class="pl-pds">"</span></span>
<span class="pl-ent">home</span>: <span class="pl-s">/opt/staff/ansible</span>
<span class="pl-ent">createhome</span>: <span class="pl-s">yes</span>
<span class="pl-ent">state</span>: <span class="pl-s">present</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [ansiblelocaluser : Add ansible local user to the server] *****************
ok: [rht02] => {"append": false, "changed": false, "comment": "Ansible admin user", "group": 600, "home": "/opt/staff/ansible", "move_home": false, "name": "ansible", "shell": "/bin/bash", "state": "present", "uid": 600}
fatal: [rht04]: FAILED! => {"changed": false, "failed": true, "msg": "usermod: user 'ansible' does not exist\n", "name": "ansible", "rc": 6}
TASK [ansiblelocaluser : set up authorized_key for ansible local user] *********
ok: [rht02] => {"changed": false, "exclusive": false, "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyAACMvkERvxgdrthtuK1gOmj88FV+Hr+gmvlMr13Kv+It+kqXF7KgfTzwD5RuZcABU30Hw+IzTe5D2IQQFx4vGOxfGPGhiadfelktLPXj2KaZSYVlfkEWtJ55VG5sEOKx8tMpMXjOMchggstTFe6+/5zCdSeb+29sAUulWHR+pom/eAmHuwO1PiW23hHWiQULzzDxwWVDnqTLvXC1qtjE4OFjmCnsiKTK7AuuU9mqvhS1bcw20hZ8o3lbkgXk0Sr9prwO39B5H8JjVwVssW2l+CqWs+qwGNOSk4Y1fTkrwAj6ZksWGs4br0+Nnyji+Y/V0NkrhVGZh0ybWkF2XFN9 ansible@ansible01", "key_options": null, "keyfile": "/opt/staff/ansible/.ssh/authorized_keys", "manage_dir": true, "path": null, "state": "present", "unique": false, "user": "ansible", "validate_certs": true}
TASK [ansiblelocaluser : make sure that ansible user are in the Unix_ADM group in /etc/sudoers] ***
ok: [rht02] => {"backup": "", "changed": false, "msg": ""}
NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @configure_ansible_env.retry
PLAY RECAP *********************************************************************
rht02 : ok=5 changed=0 unreachable=0 failed=0
rht04 : ok=2 changed=1 unreachable=0 failed=1
"><pre class="notranslate"><code class="notranslate">TASK [ansiblelocaluser : Add ansible local user to the server] *****************
ok: [rht02] => {"append": false, "changed": false, "comment": "Ansible admin user", "group": 600, "home": "/opt/staff/ansible", "move_home": false, "name": "ansible", "shell": "/bin/bash", "state": "present", "uid": 600}
fatal: [rht04]: FAILED! => {"changed": false, "failed": true, "msg": "usermod: user 'ansible' does not exist\n", "name": "ansible", "rc": 6}
TASK [ansiblelocaluser : set up authorized_key for ansible local user] *********
ok: [rht02] => {"changed": false, "exclusive": false, "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyAACMvkERvxgdrthtuK1gOmj88FV+Hr+gmvlMr13Kv+It+kqXF7KgfTzwD5RuZcABU30Hw+IzTe5D2IQQFx4vGOxfGPGhiadfelktLPXj2KaZSYVlfkEWtJ55VG5sEOKx8tMpMXjOMchggstTFe6+/5zCdSeb+29sAUulWHR+pom/eAmHuwO1PiW23hHWiQULzzDxwWVDnqTLvXC1qtjE4OFjmCnsiKTK7AuuU9mqvhS1bcw20hZ8o3lbkgXk0Sr9prwO39B5H8JjVwVssW2l+CqWs+qwGNOSk4Y1fTkrwAj6ZksWGs4br0+Nnyji+Y/V0NkrhVGZh0ybWkF2XFN9 ansible@ansible01", "key_options": null, "keyfile": "/opt/staff/ansible/.ssh/authorized_keys", "manage_dir": true, "path": null, "state": "present", "unique": false, "user": "ansible", "validate_certs": true}
TASK [ansiblelocaluser : make sure that ansible user are in the Unix_ADM group in /etc/sudoers] ***
ok: [rht02] => {"backup": "", "changed": false, "msg": ""}
NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @configure_ansible_env.retry
PLAY RECAP *********************************************************************
rht02 : ok=5 changed=0 unreachable=0 failed=0
rht04 : ok=2 changed=1 unreachable=0 failed=1
</code></pre></div>
<p dir="auto"><strong>NOTE: AD and Centrify Direct Control as user authentication</strong></p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate">
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate">
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate">
</code></pre></div> | <h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">master</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">If a role dependency is skipped, via:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
---
dependencies:
- { role: foo, when: false }"><pre class="notranslate">---
<span class="pl-ent">dependencies</span>:
- <span class="pl-s">{ role: foo, when: false }</span></pre></div>
<p dir="auto">Then it's children are also skipped, even if they are required by other roles.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# roles/foo/meta/main.yml
---
dependencies:
- { role: child, when: false }"><pre class="notranslate"><code class="notranslate"># roles/foo/meta/main.yml
---
dependencies:
- { role: child, when: false }
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# roles/bar/meta/main.yml
---
dependencies:
- { role: child }"><pre class="notranslate"><code class="notranslate"># roles/bar/meta/main.yml
---
dependencies:
- { role: child }
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# roles/parent/meta/main.yml
---
dependencies:
- { role: foo }
- { role: bar }"><pre class="notranslate"><code class="notranslate"># roles/parent/meta/main.yml
---
dependencies:
- { role: foo }
- { role: bar }
</code></pre></div>
<p dir="auto">If the <em>parent</em> role is used, then <em>child</em> will never be executed.</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Roles are re-run if required by subsequent roles, and have not been run already (under no-duplicate roles policy).</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">Role is skipped for the rest of the play.</p> | 0 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jan_goyvaerts" rel="nofollow">Jan Goyvaerts</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9087?redirect=false" rel="nofollow">SPR-9087</a></strong> and commented</p>
<p dir="auto">I have a classic JPA configuration in which I'm using Hibernate. I'd like to switch to Infinispan for 2nd level- and query caching. Mainly because this cache takes the transaction into account. This is for a standalone deployment on Tomcat.</p>
<p dir="auto">However, there is no way yet to integrate the Spring transaction manager for Infinispan. (At least, I didn't found a way.)</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">
<!-- Scan our code for Spring annotations @Component, @Repository and @Service annotated classes are added -->
<!-- to the Spring configuration as if they're declared in this file. -->
<context:component-scan base-package="com.foo" scoped-proxy="targetClass"/>
<!-- configuration transactions are done with @Transactional -->
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<!-- Describes how to connect to the database -->
<!-- Describes to reuse database connections as making them is expensive -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="user" value="${database.user.name}"/>
<property name="password" value="${database.user.password}"/>
<property name="driverClass" value="${database.driver}"/>
<property name="jdbcUrl" value="${database.url}"/>
<property name="initialPoolSize" value="1"/>
<property name="maxPoolSize" value="4"/>
<property name="minPoolSize" value="1"/>
<property name="acquireIncrement" value="1"/>
<property name="acquireRetryAttempts" value="0"/>
</bean>
<!-- Describes how to create hibernate sessions -->
<!-- "persistenceUnitName" points to META-INF/persistence.xml -->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceProviderClass" value="org.hibernate.ejb.HibernatePersistence"/>
<property name="persistenceUnitName" value="foo"/>
<property name="dataSource" ref="dataSource"/>
<property name="jpaProperties">
<props>
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.infinispan.InfinispanRegionFactory</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.infinispan.statistics">true</prop>
<prop key="hibernate.transaction.manager_lookup_class">... something of Spring should be here ... </prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
<prop key="hibernate.jdbc.batch_size">1000</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.dialect">${database.hibernate.dialect}</prop>
</props>
</property>
</bean>
</beans>"><pre class="notranslate"><?<span class="pl-ent">xml</span><span class="pl-e"> version</span>=<span class="pl-s"><span class="pl-pds">"</span>1.0<span class="pl-pds">"</span></span><span class="pl-e"> encoding</span>=<span class="pl-s"><span class="pl-pds">"</span>UTF-8<span class="pl-pds">"</span></span>?>
<<span class="pl-ent">beans</span> <span class="pl-e">xmlns</span>=<span class="pl-s"><span class="pl-pds">"</span>http://www.springframework.org/schema/beans<span class="pl-pds">"</span></span>
<span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">xsi</span>=<span class="pl-s"><span class="pl-pds">"</span>http://www.w3.org/2001/XMLSchema-instance<span class="pl-pds">"</span></span>
<span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">context</span>=<span class="pl-s"><span class="pl-pds">"</span>http://www.springframework.org/schema/context<span class="pl-pds">"</span></span>
<span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">tx</span>=<span class="pl-s"><span class="pl-pds">"</span>http://www.springframework.org/schema/tx<span class="pl-pds">"</span></span>
<span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">task</span>=<span class="pl-s"><span class="pl-pds">"</span>http://www.springframework.org/schema/task<span class="pl-pds">"</span></span>
<span class="pl-e">xsi</span><span class="pl-e">:</span><span class="pl-e">schemaLocation</span>=<span class="pl-s"><span class="pl-pds">"</span>http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd</span>
<span class="pl-s"> http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd</span>
<span class="pl-s"> http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd</span>
<span class="pl-s"> http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd<span class="pl-pds">"</span></span>>
<span class="pl-c"><span class="pl-c"><!--</span> Scan our code for Spring annotations @Component, @Repository and @Service annotated classes are added <span class="pl-c">--></span></span>
<span class="pl-c"><span class="pl-c"><!--</span> to the Spring configuration as if they're declared in this file. <span class="pl-c">--></span></span>
<<span class="pl-ent">context</span><span class="pl-ent">:</span><span class="pl-ent">component-scan</span> <span class="pl-e">base-package</span>=<span class="pl-s"><span class="pl-pds">"</span>com.foo<span class="pl-pds">"</span></span> <span class="pl-e">scoped-proxy</span>=<span class="pl-s"><span class="pl-pds">"</span>targetClass<span class="pl-pds">"</span></span>/>
<span class="pl-c"><span class="pl-c"><!--</span> configuration transactions are done with @Transactional <span class="pl-c">--></span></span>
<<span class="pl-ent">tx</span><span class="pl-ent">:</span><span class="pl-ent">annotation-driven</span> <span class="pl-e">transaction-manager</span>=<span class="pl-s"><span class="pl-pds">"</span>transactionManager<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">bean</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>transactionManager<span class="pl-pds">"</span></span> <span class="pl-e">class</span>=<span class="pl-s"><span class="pl-pds">"</span>org.springframework.orm.jpa.JpaTransactionManager<span class="pl-pds">"</span></span>>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>entityManagerFactory<span class="pl-pds">"</span></span> <span class="pl-e">ref</span>=<span class="pl-s"><span class="pl-pds">"</span>entityManagerFactory<span class="pl-pds">"</span></span>/>
</<span class="pl-ent">bean</span>>
<<span class="pl-ent">bean</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>jpaTemplate<span class="pl-pds">"</span></span> <span class="pl-e">class</span>=<span class="pl-s"><span class="pl-pds">"</span>org.springframework.orm.jpa.JpaTemplate<span class="pl-pds">"</span></span>>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>entityManagerFactory<span class="pl-pds">"</span></span> <span class="pl-e">ref</span>=<span class="pl-s"><span class="pl-pds">"</span>entityManagerFactory<span class="pl-pds">"</span></span>/>
</<span class="pl-ent">bean</span>>
<span class="pl-c"><span class="pl-c"><!--</span> Describes how to connect to the database <span class="pl-c">--></span></span>
<span class="pl-c"><span class="pl-c"><!--</span> Describes to reuse database connections as making them is expensive <span class="pl-c">--></span></span>
<<span class="pl-ent">bean</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>dataSource<span class="pl-pds">"</span></span> <span class="pl-e">class</span>=<span class="pl-s"><span class="pl-pds">"</span>com.mchange.v2.c3p0.ComboPooledDataSource<span class="pl-pds">"</span></span> <span class="pl-e">destroy-method</span>=<span class="pl-s"><span class="pl-pds">"</span>close<span class="pl-pds">"</span></span>>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>user<span class="pl-pds">"</span></span> <span class="pl-e">value</span>=<span class="pl-s"><span class="pl-pds">"</span>${database.user.name}<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>password<span class="pl-pds">"</span></span> <span class="pl-e">value</span>=<span class="pl-s"><span class="pl-pds">"</span>${database.user.password}<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>driverClass<span class="pl-pds">"</span></span> <span class="pl-e">value</span>=<span class="pl-s"><span class="pl-pds">"</span>${database.driver}<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>jdbcUrl<span class="pl-pds">"</span></span> <span class="pl-e">value</span>=<span class="pl-s"><span class="pl-pds">"</span>${database.url}<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>initialPoolSize<span class="pl-pds">"</span></span> <span class="pl-e">value</span>=<span class="pl-s"><span class="pl-pds">"</span>1<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>maxPoolSize<span class="pl-pds">"</span></span> <span class="pl-e">value</span>=<span class="pl-s"><span class="pl-pds">"</span>4<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>minPoolSize<span class="pl-pds">"</span></span> <span class="pl-e">value</span>=<span class="pl-s"><span class="pl-pds">"</span>1<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>acquireIncrement<span class="pl-pds">"</span></span> <span class="pl-e">value</span>=<span class="pl-s"><span class="pl-pds">"</span>1<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>acquireRetryAttempts<span class="pl-pds">"</span></span> <span class="pl-e">value</span>=<span class="pl-s"><span class="pl-pds">"</span>0<span class="pl-pds">"</span></span>/>
</<span class="pl-ent">bean</span>>
<span class="pl-c"><span class="pl-c"><!--</span> Describes how to create hibernate sessions <span class="pl-c">--></span></span>
<span class="pl-c"><span class="pl-c"><!--</span> "persistenceUnitName" points to META-INF/persistence.xml <span class="pl-c">--></span></span>
<<span class="pl-ent">bean</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>entityManagerFactory<span class="pl-pds">"</span></span> <span class="pl-e">class</span>=<span class="pl-s"><span class="pl-pds">"</span>org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean<span class="pl-pds">"</span></span>>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>persistenceProviderClass<span class="pl-pds">"</span></span> <span class="pl-e">value</span>=<span class="pl-s"><span class="pl-pds">"</span>org.hibernate.ejb.HibernatePersistence<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>persistenceUnitName<span class="pl-pds">"</span></span> <span class="pl-e">value</span>=<span class="pl-s"><span class="pl-pds">"</span>foo<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>dataSource<span class="pl-pds">"</span></span> <span class="pl-e">ref</span>=<span class="pl-s"><span class="pl-pds">"</span>dataSource<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">property</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>jpaProperties<span class="pl-pds">"</span></span>>
<<span class="pl-ent">props</span>>
<<span class="pl-ent">prop</span> <span class="pl-e">key</span>=<span class="pl-s"><span class="pl-pds">"</span>hibernate.cache.region.factory_class<span class="pl-pds">"</span></span>>org.hibernate.cache.infinispan.InfinispanRegionFactory</<span class="pl-ent">prop</span>>
<<span class="pl-ent">prop</span> <span class="pl-e">key</span>=<span class="pl-s"><span class="pl-pds">"</span>hibernate.cache.use_second_level_cache<span class="pl-pds">"</span></span>>true</<span class="pl-ent">prop</span>>
<<span class="pl-ent">prop</span> <span class="pl-e">key</span>=<span class="pl-s"><span class="pl-pds">"</span>hibernate.cache.use_query_cache<span class="pl-pds">"</span></span>>true</<span class="pl-ent">prop</span>>
<<span class="pl-ent">prop</span> <span class="pl-e">key</span>=<span class="pl-s"><span class="pl-pds">"</span>hibernate.cache.infinispan.statistics<span class="pl-pds">"</span></span>>true</<span class="pl-ent">prop</span>>
<<span class="pl-ent">prop</span> <span class="pl-e">key</span>=<span class="pl-s"><span class="pl-pds">"</span>hibernate.transaction.manager_lookup_class<span class="pl-pds">"</span></span>>... something of Spring should be here ... </<span class="pl-ent">prop</span>>
<<span class="pl-ent">prop</span> <span class="pl-e">key</span>=<span class="pl-s"><span class="pl-pds">"</span>hibernate.hbm2ddl.auto<span class="pl-pds">"</span></span>>create</<span class="pl-ent">prop</span>>
<<span class="pl-ent">prop</span> <span class="pl-e">key</span>=<span class="pl-s"><span class="pl-pds">"</span>hibernate.jdbc.batch_size<span class="pl-pds">"</span></span>>1000</<span class="pl-ent">prop</span>>
<<span class="pl-ent">prop</span> <span class="pl-e">key</span>=<span class="pl-s"><span class="pl-pds">"</span>hibernate.show_sql<span class="pl-pds">"</span></span>>false</<span class="pl-ent">prop</span>>
<<span class="pl-ent">prop</span> <span class="pl-e">key</span>=<span class="pl-s"><span class="pl-pds">"</span>hibernate.dialect<span class="pl-pds">"</span></span>>${database.hibernate.dialect}</<span class="pl-ent">prop</span>>
</<span class="pl-ent">props</span>>
</<span class="pl-ent">property</span>>
</<span class="pl-ent">bean</span>>
</<span class="pl-ent">beans</span>></pre></div>
<hr>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398159189" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/15217" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/15217/hovercard" href="https://github.com/spring-projects/spring-framework/issues/15217">#15217</a> Add Infinispan Cache Implementation (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto">1 votes, 4 watchers</p> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=marschall" rel="nofollow">Philippe Marschall</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-10588?redirect=false" rel="nofollow">SPR-10588</a></strong> and commented</p>
<p dir="auto">There currently is an Ehcache implementation of the cache abstraction. It would be interesting for us to have an Infinispan implementation. This would allow us to use <code class="notranslate">ConcurrentMapCache</code> for tests and the built-in JBoss AS 7 cache in production.</p>
<hr>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398117041" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13725" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13725/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13725">#13725</a> Provide transactional support for Infinispan 2nd level cache (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto">1 votes, 7 watchers</p> | 1 |
<p dir="auto">I am using FireFox 22.0 and Chrome 27.0.1453.110.</p>
<p dir="auto">For example, in this page, <a href="http://twitter.github.io/bootstrap/getting-started/" rel="nofollow">http://twitter.github.io/bootstrap/getting-started/</a></p>
<p dir="auto">If I hit "License FAQs" on the sidebar in Chrome, the page will directly scroll to the corresponding section for me, just like in the previous version of Bootstrap.</p>
<p dir="auto">However if I do this in FireFox, the click on the menu has no effect and the page won't scroll to the "License FAQs" section.</p>
<p dir="auto">Is this an issue of the documentation page only or the library itself?</p> | <p dir="auto">You cannot access on any left-side menu link with Firefox.</p>
<p dir="auto">Tested with Firefox 22.0 on Mac</p> | 1 |
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="282410055" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4454" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/4454/hovercard" href="https://github.com/celery/celery/issues/4454">#4454</a></li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: 4.3.0 with fixes in PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="444739232" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5527" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/5527/hovercard" href="https://github.com/celery/celery/pull/5527">#5527</a></p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -> celery:4.3.0 (rhubarb) kombu:4.6.4 py:3.7.4
billiard:3.6.1.0 py-amqp:2.5.1
platform -> system:Windows arch:64bit, WindowsPE
kernel version:10 imp:CPython
loader -> celery.loaders.default.Loader
settings -> transport:amqp results:disabled"><pre class="notranslate"><code class="notranslate">software -> celery:4.3.0 (rhubarb) kombu:4.6.4 py:3.7.4
billiard:3.6.1.0 py-amqp:2.5.1
platform -> system:Windows arch:64bit, WindowsPE
kernel version:10 imp:CPython
loader -> celery.loaders.default.Loader
settings -> transport:amqp results:disabled
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<ol dir="auto">
<li>Give Celery a Backend URL pointing to a MongoDB like below:<br>
mongodb://admin:[email protected]/task?authSource=admin&authMechanism=SCRAM-SHA-256</li>
<li>Start Celery worker.</li>
<li>Send any task.</li>
</ol>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.0</li>
<li><strong>Minimal Celery Version</strong>: 3.0</li>
<li><strong>Minimal Kombu Version</strong>: Unknown</li>
<li><strong>Minimal Broker Version</strong>: Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: MongoDB 4.0</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A</li>
<li><strong>Minimal Broker Client Version</strong>: Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp==2.5.1
asn1crypto==0.24.0
astroid==2.2.5
bcrypt==3.1.7
billiard==3.6.1.0
celery==4.3.0
cffi==1.12.3
Click==7.0
colorama==0.4.1
cryptography==2.7
irectory=backend
Flask==1.1.1
importlib-metadata==0.19
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.10.1
kombu==4.6.4
lazy-object-proxy==1.4.2
MarkupSafe==1.1.1
mccabe==0.6.1
more-itertools==7.2.0
paramiko==2.6.0
pycparser==2.19
pylint==2.3.1
pymodm==0.4.1
pymongo==3.9.0
PyNaCl==1.3.0
pytz==2019.2
six==1.12.0
typed-ast==1.4.0
vine==1.3.0
Werkzeug==0.15.5
wrapt==1.11.2
zipp==0.6.0"><pre class="notranslate"><code class="notranslate">amqp==2.5.1
asn1crypto==0.24.0
astroid==2.2.5
bcrypt==3.1.7
billiard==3.6.1.0
celery==4.3.0
cffi==1.12.3
Click==7.0
colorama==0.4.1
cryptography==2.7
irectory=backend
Flask==1.1.1
importlib-metadata==0.19
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.10.1
kombu==4.6.4
lazy-object-proxy==1.4.2
MarkupSafe==1.1.1
mccabe==0.6.1
more-itertools==7.2.0
paramiko==2.6.0
pycparser==2.19
pylint==2.3.1
pymodm==0.4.1
pymongo==3.9.0
PyNaCl==1.3.0
pytz==2019.2
six==1.12.0
typed-ast==1.4.0
vine==1.3.0
Werkzeug==0.15.5
wrapt==1.11.2
zipp==0.6.0
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<summary><b>MongoDB:</b></summary>
<p dir="auto">
Version: >= 3.0.0
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Support all the authentication options listed at <a href="https://docs.mongodb.com/manual/reference/connection-string/#authentication-options" rel="nofollow">authentication-options</a>, including <em>authSource</em>, <em>authMechanism</em>, <em>authMechanismProperties</em> and <em>gssapiServiceName</em>.</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">An error occurred as below.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py", line 42, in __get__
return obj.__dict__[self.__name__]
KeyError: 'collection'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py", line 42, in __get__
return obj.__dict__[self.__name__]
KeyError: 'database'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\user\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\user\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py", line 432, in main
run()
File "c:\Users\user\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py", line 316, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Program Files\Python37\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Program Files\Python37\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Program Files\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "d:\GitHub\org\dev\backend\tests\workertest.py", line 22, in <module>
print('Task finished? ', result.ready())
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\result.py", line 313, in ready
return self.state in self.backend.READY_STATES
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\result.py", line 473, in state
return self._get_task_meta()['status']
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\result.py", line 412, in _get_task_meta
return self._maybe_set_cache(self.backend.get_task_meta(self.id))
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\base.py", line 386, in get_task_meta
meta = self._get_task_meta_for(task_id)
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\mongodb.py", line 206, in _get_task_meta_for
obj = self.collection.find_one({'_id': task_id})
File "D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py", line 44, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\mongodb.py", line 293, in collection
collection = self.database[self.taskmeta_collection]
File "D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py", line 44, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\mongodb.py", line 288, in database
return self._get_database()
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\mongodb.py", line 271, in _get_database
conn = self._get_connection()
File "D:\GitHub\org\dev\.venv\lib\site-packages\celery\backends\mongodb.py", line 161, in _get_connection
self._connection = MongoClient(**conf)
File "D:\GitHub\org\dev\.venv\lib\site-packages\pymongo\mongo_client.py", line 668, in __init__
username, password, dbase, opts)
File "D:\GitHub\org\dev\.venv\lib\site-packages\pymongo\client_options.py", line 151, in __init__
username, password, database, options)
File "D:\GitHub\org\dev\.venv\lib\site-packages\pymongo\client_options.py", line 39, in _parse_credentials
mechanism, source, username, password, options, database)
File "D:\GitHub\org\dev\.venv\lib\site-packages\pymongo\auth.py", line 107, in _build_credentials_tuple
raise ConfigurationError("%s requires a username." % (mech,))
pymongo.errors.ConfigurationError: SCRAM-SHA-256 requires a username."><pre class="notranslate"><span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>):
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">42</span>, <span class="pl-s1">in</span> <span class="pl-s1">__get__</span>
<span class="pl-k">return</span> <span class="pl-s1">obj</span>.<span class="pl-s1">__dict__</span>[<span class="pl-s1">self</span>.<span class="pl-s1">__name__</span>]
<span class="pl-v">KeyError</span>: <span class="pl-s">'collection'</span>
<span class="pl-v">During</span> <span class="pl-s1">handling</span> <span class="pl-s1">of</span> <span class="pl-s1">the</span> <span class="pl-s1">above</span> <span class="pl-s1">exception</span>, <span class="pl-s1">another</span> <span class="pl-s1">exception</span> <span class="pl-s1">occurred</span>:
<span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>):
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">42</span>, <span class="pl-s1">in</span> <span class="pl-s1">__get__</span>
<span class="pl-k">return</span> <span class="pl-s1">obj</span>.<span class="pl-s1">__dict__</span>[<span class="pl-s1">self</span>.<span class="pl-s1">__name__</span>]
<span class="pl-v">KeyError</span>: <span class="pl-s">'database'</span>
<span class="pl-v">During</span> <span class="pl-s1">handling</span> <span class="pl-s1">of</span> <span class="pl-s1">the</span> <span class="pl-s1">above</span> <span class="pl-s1">exception</span>, <span class="pl-s1">another</span> <span class="pl-s1">exception</span> <span class="pl-s1">occurred</span>:
<span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>):
<span class="pl-v">File</span> <span class="pl-s">"c:\Users\user\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\ptvsd_launcher.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">43</span>, <span class="pl-s1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-en">main</span>(<span class="pl-s1">ptvsdArgs</span>)
<span class="pl-v">File</span> <span class="pl-s">"c:\Users\user\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">432</span>, <span class="pl-s1">in</span> <span class="pl-s1">main</span>
<span class="pl-en">run</span>()
<span class="pl-v">File</span> <span class="pl-s">"c:\Users\user\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">316</span>, <span class="pl-s1">in</span> <span class="pl-s1">run_file</span>
<span class="pl-s1">runpy</span>.<span class="pl-en">run_path</span>(<span class="pl-s1">target</span>, <span class="pl-s1">run_name</span><span class="pl-c1">=</span><span class="pl-s">'__main__'</span>)
<span class="pl-v">File</span> <span class="pl-s">"C:\Program Files\Python37\lib<span class="pl-cce">\r</span>unpy.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">263</span>, <span class="pl-s1">in</span> <span class="pl-s1">run_path</span>
<span class="pl-s1">pkg_name</span><span class="pl-c1">=</span><span class="pl-s1">pkg_name</span>, <span class="pl-s1">script_name</span><span class="pl-c1">=</span><span class="pl-s1">fname</span>)
<span class="pl-v">File</span> <span class="pl-s">"C:\Program Files\Python37\lib<span class="pl-cce">\r</span>unpy.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">96</span>, <span class="pl-s1">in</span> <span class="pl-s1">_run_module_code</span>
<span class="pl-s1">mod_name</span>, <span class="pl-s1">mod_spec</span>, <span class="pl-s1">pkg_name</span>, <span class="pl-s1">script_name</span>)
<span class="pl-v">File</span> <span class="pl-s">"C:\Program Files\Python37\lib<span class="pl-cce">\r</span>unpy.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">85</span>, <span class="pl-s1">in</span> <span class="pl-s1">_run_code</span>
<span class="pl-en">exec</span>(<span class="pl-s1">code</span>, <span class="pl-s1">run_globals</span>)
<span class="pl-v">File</span> <span class="pl-s">"d:\GitHub\org\dev<span class="pl-cce">\b</span>ackend<span class="pl-cce">\t</span>ests\workertest.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">22</span>, <span class="pl-s1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>
<span class="pl-en">print</span>(<span class="pl-s">'Task finished? '</span>, <span class="pl-s1">result</span>.<span class="pl-en">ready</span>())
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\celery<span class="pl-cce">\r</span>esult.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">313</span>, <span class="pl-s1">in</span> <span class="pl-s1">ready</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-s1">state</span> <span class="pl-c1">in</span> <span class="pl-s1">self</span>.<span class="pl-s1">backend</span>.<span class="pl-v">READY_STATES</span>
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\celery<span class="pl-cce">\r</span>esult.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">473</span>, <span class="pl-s1">in</span> <span class="pl-s1">state</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_task_meta</span>()[<span class="pl-s">'status'</span>]
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\celery<span class="pl-cce">\r</span>esult.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">412</span>, <span class="pl-s1">in</span> <span class="pl-s1">_get_task_meta</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_maybe_set_cache</span>(<span class="pl-s1">self</span>.<span class="pl-s1">backend</span>.<span class="pl-en">get_task_meta</span>(<span class="pl-s1">self</span>.<span class="pl-s1">id</span>))
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\celery<span class="pl-cce">\b</span>ackends<span class="pl-cce">\b</span>ase.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">386</span>, <span class="pl-s1">in</span> <span class="pl-s1">get_task_meta</span>
<span class="pl-s1">meta</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_task_meta_for</span>(<span class="pl-s1">task_id</span>)
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\celery<span class="pl-cce">\b</span>ackends\mongodb.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">206</span>, <span class="pl-s1">in</span> <span class="pl-s1">_get_task_meta_for</span>
<span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">collection</span>.<span class="pl-en">find_one</span>({<span class="pl-s">'_id'</span>: <span class="pl-s1">task_id</span>})
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">44</span>, <span class="pl-s1">in</span> <span class="pl-s1">__get__</span>
<span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-s1">obj</span>.<span class="pl-s1">__dict__</span>[<span class="pl-s1">self</span>.<span class="pl-s1">__name__</span>] <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">__get</span>(<span class="pl-s1">obj</span>)
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\celery<span class="pl-cce">\b</span>ackends\mongodb.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">293</span>, <span class="pl-s1">in</span> <span class="pl-s1">collection</span>
<span class="pl-s1">collection</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">database</span>[<span class="pl-s1">self</span>.<span class="pl-s1">taskmeta_collection</span>]
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\kombu\utils\objects.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">44</span>, <span class="pl-s1">in</span> <span class="pl-s1">__get__</span>
<span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-s1">obj</span>.<span class="pl-s1">__dict__</span>[<span class="pl-s1">self</span>.<span class="pl-s1">__name__</span>] <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">__get</span>(<span class="pl-s1">obj</span>)
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\celery<span class="pl-cce">\b</span>ackends\mongodb.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">288</span>, <span class="pl-s1">in</span> <span class="pl-s1">database</span>
<span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_database</span>()
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\celery<span class="pl-cce">\b</span>ackends\mongodb.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">271</span>, <span class="pl-s1">in</span> <span class="pl-s1">_get_database</span>
<span class="pl-s1">conn</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_connection</span>()
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\celery<span class="pl-cce">\b</span>ackends\mongodb.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">161</span>, <span class="pl-s1">in</span> <span class="pl-s1">_get_connection</span>
<span class="pl-s1">self</span>.<span class="pl-s1">_connection</span> <span class="pl-c1">=</span> <span class="pl-v">MongoClient</span>(<span class="pl-c1">**</span><span class="pl-s1">conf</span>)
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\pymongo\mongo_client.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">668</span>, <span class="pl-s1">in</span> <span class="pl-s1">__init__</span>
<span class="pl-s1">username</span>, <span class="pl-s1">password</span>, <span class="pl-s1">dbase</span>, <span class="pl-s1">opts</span>)
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\pymongo\client_options.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">151</span>, <span class="pl-s1">in</span> <span class="pl-s1">__init__</span>
<span class="pl-s1">username</span>, <span class="pl-s1">password</span>, <span class="pl-s1">database</span>, <span class="pl-s1">options</span>)
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\pymongo\client_options.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">39</span>, <span class="pl-s1">in</span> <span class="pl-s1">_parse_credentials</span>
<span class="pl-s1">mechanism</span>, <span class="pl-s1">source</span>, <span class="pl-s1">username</span>, <span class="pl-s1">password</span>, <span class="pl-s1">options</span>, <span class="pl-s1">database</span>)
<span class="pl-v">File</span> <span class="pl-s">"D:\GitHub\org\dev\.venv\lib\site-packages\pymongo<span class="pl-cce">\a</span>uth.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">107</span>, <span class="pl-s1">in</span> <span class="pl-s1">_build_credentials_tuple</span>
<span class="pl-k">raise</span> <span class="pl-v">ConfigurationError</span>(<span class="pl-s">"%s requires a username."</span> <span class="pl-c1">%</span> (<span class="pl-s1">mech</span>,))
<span class="pl-s1">pymongo</span>.<span class="pl-s1">errors</span>.<span class="pl-v">ConfigurationError</span>: <span class="pl-v">SCRAM</span><span class="pl-c1">-</span><span class="pl-v">SHA</span><span class="pl-c1">-</span><span class="pl-c1">256</span> <span class="pl-s1">requires</span> <span class="pl-s1">a</span> <span class="pl-s1">username</span>.</pre></div> | <h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22Issue+Type%3A+Feature+Request%22+">issues list</a><br>
for similar or identical feature requests.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/pulls?utf8=%E2%9C%93&q=is%3Apr+label%3A%22PR+Type%3A+Feature%22+">pull requests list</a><br>
for existing proposed implementations of this feature.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the same feature was already implemented in the<br>
master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h1 dir="auto">Brief Summary</h1>
<p dir="auto">NotImplementedError: <class 'celery.concurrency.gevent.TaskPool'> does not implement kill_job</p> | 0 |
<h3 dir="auto">Describe the issue:</h3>
<p dir="auto">Failed building wheel for numpy 1.23.1 on termux.<br>
numpy 1.22.0 installed successfully.</p>
<h3 dir="auto">Reproduce the code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pip install numpy"><pre class="notranslate"><span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-s1">numpy</span></pre></div>
<h3 dir="auto">Error message:</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="~ pip install --upgrade numpy
Requirement already satisfied: numpy in /data/data/com.termux/files/usr/lib/python3.10/site-packages (1.22.0)
Collecting numpy
Using cached numpy-1.23.1.tar.gz (10.7 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: numpy
Building wheel for numpy (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for numpy (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [264 lines of output]
Running from numpy source directory.
setup.py:86: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
import numpy.distutils.command.sdist
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_bounded_integers.pyx.in
Processing numpy/random/_common.pyx
Processing numpy/random/_generator.pyx
Processing numpy/random/_mt19937.pyx
Processing numpy/random/_pcg64.pyx
Processing numpy/random/_philox.pyx
Processing numpy/random/_sfc64.pyx
Processing numpy/random/bit_generator.pyx
Processing numpy/random/mtrand.pyx
Cythonizing sources
INFO: blas_opt_info:
INFO: blas_armpl_info:
INFO: customize UnixCCompiler
INFO: libraries armpl_lp64_mp not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: blas_mkl_info:
INFO: libraries mkl_rt not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: blis_info:
INFO: libraries blis not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: openblas_info:
INFO: libraries openblas not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: accelerate_info:
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_blas_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries tatlas not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_blas_info:
INFO: libraries satlas not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: atlas_blas_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries ptf77blas,ptcblas,atlas not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: atlas_blas_info:
INFO: libraries f77blas,cblas,atlas not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/system_info.py:2077: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
if self._calc_info(blas):
INFO: blas_info:
INFO: libraries blas not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/system_info.py:2077: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
if self._calc_info(blas):
INFO: blas_src_info:
INFO: NOT AVAILABLE
INFO:
/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/system_info.py:2077: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
if self._calc_info(blas):
INFO: NOT AVAILABLE
INFO:
non-existing path in 'numpy/distutils': 'site.cfg'
INFO: lapack_opt_info:
INFO: lapack_armpl_info:
INFO: libraries armpl_lp64_mp not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: lapack_mkl_info:
INFO: libraries mkl_rt not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: openblas_lapack_info:
INFO: libraries openblas not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: openblas_clapack_info:
INFO: libraries openblas,lapack not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: flame_info:
INFO: libraries flame not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries tatlas,tatlas not found in /data/data/com.termux/files/usr/lib
INFO: <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_info:
INFO: libraries satlas,satlas not found in /data/data/com.termux/files/usr/lib
INFO: <class 'numpy.distutils.system_info.atlas_3_10_info'>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries ptf77blas,ptcblas,atlas not found in /data/data/com.termux/files/usr/lib
INFO: <class 'numpy.distutils.system_info.atlas_threads_info'>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_info:
INFO: libraries f77blas,cblas,atlas not found in /data/data/com.termux/files/usr/lib
INFO: <class 'numpy.distutils.system_info.atlas_info'>
INFO: NOT AVAILABLE
INFO:
INFO: lapack_info:
INFO: libraries lapack not found in ['/data/data/com.termux/files/usr/lib']
INFO: NOT AVAILABLE
INFO:
/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/system_info.py:1902: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
INFO: lapack_src_info:
INFO: NOT AVAILABLE
INFO:
/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/system_info.py:1902: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
return getattr(self, '_calc_info_{}'.format(name))()
INFO: NOT AVAILABLE
INFO:
INFO: numpy_linalg_lapack_lite:
INFO: FOUND:
INFO: language = c
INFO: define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]
INFO:
Warning: attempted relative import with no known parent package
/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running bdist_wheel
running build
running config_cc
INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
INFO: build_src
INFO: building py_modules sources
creating build
creating build/src.linux-aarch64-3.10
creating build/src.linux-aarch64-3.10/numpy
creating build/src.linux-aarch64-3.10/numpy/distutils
INFO: building library "npymath" sources
WARN: Could not locate executable armflang
WARN: Could not locate executable gfortran
WARN: Could not locate executable f95
WARN: Could not locate executable ifort
WARN: Could not locate executable ifc
WARN: Could not locate executable lf95
WARN: Could not locate executable pgfortran
WARN: Could not locate executable nvfortran
WARN: Could not locate executable f90
WARN: Could not locate executable f77
WARN: Could not locate executable fort
WARN: Could not locate executable efort
WARN: Could not locate executable efc
WARN: Could not locate executable g77
WARN: Could not locate executable g95
WARN: Could not locate executable pathf95
WARN: Could not locate executable nagfor
WARN: Could not locate executable frt
WARN: don't know how to compile Fortran code on platform 'posix'
creating build/src.linux-aarch64-3.10/numpy/core
creating build/src.linux-aarch64-3.10/numpy/core/src
creating build/src.linux-aarch64-3.10/numpy/core/src/npymath
INFO: conv_template:> build/src.linux-aarch64-3.10/numpy/core/src/npymath/npy_math_internal.h
INFO: adding 'build/src.linux-aarch64-3.10/numpy/core/src/npymath' to include_dirs.
INFO: conv_template:> build/src.linux-aarch64-3.10/numpy/core/src/npymath/ieee754.c
INFO: conv_template:> build/src.linux-aarch64-3.10/numpy/core/src/npymath/npy_math_complex.c
INFO: None - nothing done with h_files = ['build/src.linux-aarch64-3.10/numpy/core/src/npymath/npy_math_internal.h']
INFO: building library "npyrandom" sources
INFO: building extension "numpy.core._multiarray_tests" sources
creating build/src.linux-aarch64-3.10/numpy/core/src/multiarray
INFO: conv_template:> build/src.linux-aarch64-3.10/numpy/core/src/multiarray/_multiarray_tests.c
INFO: building extension "numpy.core._multiarray_umath" sources
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 230, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
self.run_setup()
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 267, in run_setup
super(_BuildMetaLegacyBackend,
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 493, in <module>
setup_package()
File "setup.py", line 485, in setup_package
setup(**metadata)
File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
dist.run_commands()
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/command/build.py", line 62, in run
old_build.run(self)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/command/build_src.py", line 144, in run
self.build_sources()
File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/command/build_src.py", line 161, in build_sources
self.build_extension_sources(ext)
File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/command/build_src.py", line 318, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/command/build_src.py", line 378, in generate_sources
source = func(extension, build_dir)
File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/core/setup.py", line 513, in generate_config_h
check_math_capabilities(config_cmd, ext, moredefs, mathlibs)
File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/core/setup.py", line 176, in check_math_capabilities
raise SystemError("One of the required function to build numpy is not"
SystemError: One of the required function to build numpy is not available (the list is ['sin', 'cos', 'tan', 'sinh', 'cosh', 'tanh', 'fabs', 'floor', 'ceil', 'sqrt', 'log10', 'log', 'exp', 'asin', 'acos', 'atan', 'fmod', 'modf', 'frexp', 'ldexp']).
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects"><pre class="notranslate"><span class="pl-k">~</span> pip install --upgrade numpy
Requirement already satisfied: numpy <span class="pl-k">in</span> /data/data/com.termux/files/usr/lib/python3.10/site-packages (1.22.0)
Collecting numpy
Using cached numpy-1.23.1.tar.gz (10.7 MB)
Installing build dependencies ... <span class="pl-k">done</span>
Getting requirements to build wheel ... <span class="pl-k">done</span>
Preparing metadata (pyproject.toml) ... <span class="pl-k">done</span>
Building wheels <span class="pl-k">for</span> collected packages: numpy
Building wheel <span class="pl-k">for</span> numpy (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel <span class="pl-k">for</span> numpy (pyproject.toml) did not run successfully.
│ <span class="pl-c1">exit</span> code: 1
╰─<span class="pl-k">></span> [264 lines of output]
Running from numpy <span class="pl-c1">source</span> directory.
setup.py:86: DeprecationWarning:
<span class="pl-s"><span class="pl-pds">`</span>numpy.distutils<span class="pl-pds">`</span></span> is deprecated since NumPy 1.23.0, as a result
of the deprecation of <span class="pl-s"><span class="pl-pds">`</span>distutils<span class="pl-pds">`</span></span> itself. It will be removed <span class="pl-k">for</span>
Python <span class="pl-k">></span>= 3.12. For older Python versions it will remain present.
It is recommended to use <span class="pl-s"><span class="pl-pds">`</span>setuptools <span class="pl-k"><</span> 60.0<span class="pl-pds">`</span></span> <span class="pl-k">for</span> those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
import numpy.distutils.command.sdist
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_bounded_integers.pyx.in
Processing numpy/random/_common.pyx
Processing numpy/random/_generator.pyx
Processing numpy/random/_mt19937.pyx
Processing numpy/random/_pcg64.pyx
Processing numpy/random/_philox.pyx
Processing numpy/random/_sfc64.pyx
Processing numpy/random/bit_generator.pyx
Processing numpy/random/mtrand.pyx
Cythonizing sources
INFO: blas_opt_info:
INFO: blas_armpl_info:
INFO: customize UnixCCompiler
INFO: libraries armpl_lp64_mp not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: blas_mkl_info:
INFO: libraries mkl_rt not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: blis_info:
INFO: libraries blis not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: openblas_info:
INFO: libraries openblas not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: accelerate_info:
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_blas_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries tatlas not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_blas_info:
INFO: libraries satlas not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: atlas_blas_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries ptf77blas,ptcblas,atlas not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: atlas_blas_info:
INFO: libraries f77blas,cblas,atlas not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/system_info.py:2077: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
<span class="pl-k">if</span> self._calc_info(blas):
INFO: blas_info:
INFO: libraries blas not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/system_info.py:2077: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search <span class="pl-k">for</span> <span class="pl-smi">the libraries can be specified</span> <span class="pl-k">in</span> the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
<span class="pl-k">if</span> self._calc_info(blas):
INFO: blas_src_info:
INFO: NOT AVAILABLE
INFO:
/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/system_info.py:2077: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search <span class="pl-k">for</span> <span class="pl-smi">the sources can be specified</span> <span class="pl-k">in</span> the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
<span class="pl-k">if</span> self._calc_info(blas):
INFO: NOT AVAILABLE
INFO:
non-existing path <span class="pl-k">in</span> <span class="pl-s"><span class="pl-pds">'</span>numpy/distutils<span class="pl-pds">'</span></span>: <span class="pl-s"><span class="pl-pds">'</span>site.cfg<span class="pl-pds">'</span></span>
INFO: lapack_opt_info:
INFO: lapack_armpl_info:
INFO: libraries armpl_lp64_mp not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: lapack_mkl_info:
INFO: libraries mkl_rt not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: openblas_lapack_info:
INFO: libraries openblas not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: openblas_clapack_info:
INFO: libraries openblas,lapack not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: flame_info:
INFO: libraries flame not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries tatlas,tatlas not found <span class="pl-k">in</span> /data/data/com.termux/files/usr/lib
INFO: <span class="pl-k"><</span>class <span class="pl-s"><span class="pl-pds">'</span>numpy.distutils.system_info.atlas_3_10_threads_info<span class="pl-pds">'</span></span><span class="pl-k">></span>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_3_10_info:
INFO: libraries satlas,satlas not found <span class="pl-k">in</span> /data/data/com.termux/files/usr/lib
INFO: <span class="pl-k"><</span>class <span class="pl-s"><span class="pl-pds">'</span>numpy.distutils.system_info.atlas_3_10_info<span class="pl-pds">'</span></span><span class="pl-k">></span>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_threads_info:
INFO: Setting PTATLAS=ATLAS
INFO: libraries ptf77blas,ptcblas,atlas not found <span class="pl-k">in</span> /data/data/com.termux/files/usr/lib
INFO: <span class="pl-k"><</span>class <span class="pl-s"><span class="pl-pds">'</span>numpy.distutils.system_info.atlas_threads_info<span class="pl-pds">'</span></span><span class="pl-k">></span>
INFO: NOT AVAILABLE
INFO:
INFO: atlas_info:
INFO: libraries f77blas,cblas,atlas not found <span class="pl-k">in</span> /data/data/com.termux/files/usr/lib
INFO: <span class="pl-k"><</span>class <span class="pl-s"><span class="pl-pds">'</span>numpy.distutils.system_info.atlas_info<span class="pl-pds">'</span></span><span class="pl-k">></span>
INFO: NOT AVAILABLE
INFO:
INFO: lapack_info:
INFO: libraries lapack not found <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>/data/data/com.termux/files/usr/lib<span class="pl-pds">'</span></span>]
INFO: NOT AVAILABLE
INFO:
/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/system_info.py:1902: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search <span class="pl-k">for</span> <span class="pl-smi">the libraries can be specified</span> <span class="pl-k">in</span> the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
<span class="pl-k">return</span> getattr(self, <span class="pl-s"><span class="pl-pds">'</span>_calc_info_{}<span class="pl-pds">'</span></span>.format(name))()
INFO: lapack_src_info:
INFO: NOT AVAILABLE
INFO:
/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/system_info.py:1902: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search <span class="pl-k">for</span> <span class="pl-smi">the sources can be specified</span> <span class="pl-k">in</span> the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
<span class="pl-k">return</span> getattr(self, <span class="pl-s"><span class="pl-pds">'</span>_calc_info_{}<span class="pl-pds">'</span></span>.format(name))()
INFO: NOT AVAILABLE
INFO:
INFO: numpy_linalg_lapack_lite:
INFO: FOUND:
INFO: language = c
INFO: define_macros = [(<span class="pl-s"><span class="pl-pds">'</span>HAVE_BLAS_ILP64<span class="pl-pds">'</span></span>, None), (<span class="pl-s"><span class="pl-pds">'</span>BLAS_SYMBOL_SUFFIX<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>64_<span class="pl-pds">'</span></span>)]
INFO:
Warning: attempted relative import with no known parent package
/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: <span class="pl-s"><span class="pl-pds">'</span>define_macros<span class="pl-pds">'</span></span>
warnings.warn(msg)
running bdist_wheel
running build
running config_cc
INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
INFO: build_src
INFO: building py_modules sources
creating build
creating build/src.linux-aarch64-3.10
creating build/src.linux-aarch64-3.10/numpy
creating build/src.linux-aarch64-3.10/numpy/distutils
INFO: building library <span class="pl-s"><span class="pl-pds">"</span>npymath<span class="pl-pds">"</span></span> sources
WARN: Could not locate executable armflang
WARN: Could not locate executable gfortran
WARN: Could not locate executable f95
WARN: Could not locate executable ifort
WARN: Could not locate executable ifc
WARN: Could not locate executable lf95
WARN: Could not locate executable pgfortran
WARN: Could not locate executable nvfortran
WARN: Could not locate executable f90
WARN: Could not locate executable f77
WARN: Could not locate executable fort
WARN: Could not locate executable efort
WARN: Could not locate executable efc
WARN: Could not locate executable g77
WARN: Could not locate executable g95
WARN: Could not locate executable pathf95
WARN: Could not locate executable nagfor
WARN: Could not locate executable frt
WARN: don<span class="pl-s"><span class="pl-pds">'</span>t know how to compile Fortran code on platform <span class="pl-pds">'</span></span>posix<span class="pl-s"><span class="pl-pds">'</span></span>
<span class="pl-s"> creating build/src.linux-aarch64-3.10/numpy/core</span>
<span class="pl-s"> creating build/src.linux-aarch64-3.10/numpy/core/src</span>
<span class="pl-s"> creating build/src.linux-aarch64-3.10/numpy/core/src/npymath</span>
<span class="pl-s"> INFO: conv_template:> build/src.linux-aarch64-3.10/numpy/core/src/npymath/npy_math_internal.h</span>
<span class="pl-s"> INFO: adding <span class="pl-pds">'</span></span>build/src.linux-aarch64-3.10/numpy/core/src/npymath<span class="pl-s"><span class="pl-pds">'</span> to include_dirs.</span>
<span class="pl-s"> INFO: conv_template:> build/src.linux-aarch64-3.10/numpy/core/src/npymath/ieee754.c</span>
<span class="pl-s"> INFO: conv_template:> build/src.linux-aarch64-3.10/numpy/core/src/npymath/npy_math_complex.c</span>
<span class="pl-s"> INFO: None - nothing done with h_files = [<span class="pl-pds">'</span></span>build/src.linux-aarch64-3.10/numpy/core/src/npymath/npy_math_internal.h<span class="pl-s"><span class="pl-pds">'</span>]</span>
<span class="pl-s"> INFO: building library "npyrandom" sources</span>
<span class="pl-s"> INFO: building extension "numpy.core._multiarray_tests" sources</span>
<span class="pl-s"> creating build/src.linux-aarch64-3.10/numpy/core/src/multiarray</span>
<span class="pl-s"> INFO: conv_template:> build/src.linux-aarch64-3.10/numpy/core/src/multiarray/_multiarray_tests.c</span>
<span class="pl-s"> INFO: building extension "numpy.core._multiarray_umath" sources</span>
<span class="pl-s"> Traceback (most recent call last):</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module></span>
<span class="pl-s"> main()</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main</span>
<span class="pl-s"> json_out[<span class="pl-pds">'</span></span>return_val<span class="pl-s"><span class="pl-pds">'</span>] = hook(**hook_input[<span class="pl-pds">'</span></span>kwargs<span class="pl-s"><span class="pl-pds">'</span>])</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel</span>
<span class="pl-s"> return _build_backend().build_wheel(wheel_directory, config_settings,</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 230, in build_wheel</span>
<span class="pl-s"> return self._build_with_temp_dir([<span class="pl-pds">'</span></span>bdist_wheel<span class="pl-s"><span class="pl-pds">'</span>], <span class="pl-pds">'</span></span>.whl<span class="pl-s"><span class="pl-pds">'</span>,</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir</span>
<span class="pl-s"> self.run_setup()</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 267, in run_setup</span>
<span class="pl-s"> super(_BuildMetaLegacyBackend,</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 158, in run_setup</span>
<span class="pl-s"> exec(compile(code, __file__, <span class="pl-pds">'</span></span>exec<span class="pl-s"><span class="pl-pds">'</span>), locals())</span>
<span class="pl-s"> File "setup.py", line 493, in <module></span>
<span class="pl-s"> setup_package()</span>
<span class="pl-s"> File "setup.py", line 485, in setup_package</span>
<span class="pl-s"> setup(**metadata)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/core.py", line 169, in setup</span>
<span class="pl-s"> return old_setup(**new_attr)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup</span>
<span class="pl-s"> return distutils.core.setup(**attrs)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup</span>
<span class="pl-s"> dist.run_commands()</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands</span>
<span class="pl-s"> self.run_command(cmd)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command</span>
<span class="pl-s"> cmd_obj.run()</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 299, in run</span>
<span class="pl-s"> self.run_command(<span class="pl-pds">'</span></span>build<span class="pl-s"><span class="pl-pds">'</span>)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command</span>
<span class="pl-s"> self.distribution.run_command(command)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command</span>
<span class="pl-s"> cmd_obj.run()</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/command/build.py", line 62, in run</span>
<span class="pl-s"> old_build.run(self)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run</span>
<span class="pl-s"> self.run_command(cmd_name)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command</span>
<span class="pl-s"> self.distribution.run_command(command)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-build-env-kgfmqn3p/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command</span>
<span class="pl-s"> cmd_obj.run()</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/command/build_src.py", line 144, in run</span>
<span class="pl-s"> self.build_sources()</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/command/build_src.py", line 161, in build_sources</span>
<span class="pl-s"> self.build_extension_sources(ext)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/command/build_src.py", line 318, in build_extension_sources</span>
<span class="pl-s"> sources = self.generate_sources(sources, ext)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/distutils/command/build_src.py", line 378, in generate_sources</span>
<span class="pl-s"> source = func(extension, build_dir)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/core/setup.py", line 513, in generate_config_h</span>
<span class="pl-s"> check_math_capabilities(config_cmd, ext, moredefs, mathlibs)</span>
<span class="pl-s"> File "/data/data/com.termux/files/usr/tmp/pip-install-it2r5hri/numpy_4ccd1d6a6dfd4714af11cbdb029cb697/numpy/core/setup.py", line 176, in check_math_capabilities</span>
<span class="pl-s"> raise SystemError("One of the required function to build numpy is not"</span>
<span class="pl-s"> SystemError: One of the required function to build numpy is not available (the list is [<span class="pl-pds">'</span></span>sin<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>cos<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>tan<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>sinh<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>cosh<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>tanh<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>fabs<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>floor<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>ceil<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>sqrt<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>log10<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>log<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>exp<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>asin<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>acos<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>atan<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>fmod<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>modf<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>frexp<span class="pl-s"><span class="pl-pds">'</span>, <span class="pl-pds">'</span></span>ldexp<span class="pl-s"><span class="pl-pds">'</span>]).</span>
<span class="pl-s"> [end of output]</span>
<span class="pl-s"></span>
<span class="pl-s"> note: This error originates from a subprocess, and is likely not a problem with pip.</span>
<span class="pl-s"> ERROR: Failed building wheel for numpy</span>
<span class="pl-s">Failed to build numpy</span>
<span class="pl-s">ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects</span></pre></div>
<h3 dir="auto">NumPy/Python version information:</h3>
<p dir="auto">numpy 1.23.1 , python 3.10.6<br>
Android, termux 0.118</p> | <h3 dir="auto">Issue with current documentation:</h3>
<p dir="auto">Current parameters <a href="https://numpy.org/doc/stable/reference/generated/numpy.where.html" rel="nofollow">are listed as</a>:</p>
<p dir="auto">numpy.where(condition, [x, y, ]/)</p>
<p dir="auto">However, the function expects (condition, x, y) where x and y are both array-like. Providing both in a list (as [x,y] suggests) raises the following.</p>
<p dir="auto">ValueError: either both or neither of x and y should be given</p>
<h3 dir="auto">Idea or request for content:</h3>
<p dir="auto">Change to numpy.where(condition, x, y)</p>
<p dir="auto">I've tried to find where the source for this is located so I could open a pull request, but I couldn't find the where function in the docs (This is my first time contributing to an open source project).</p>
<p dir="auto">I've tried to follow the contribution guidelines, but please let me know if I ought to do something differently!</p> | 0 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/14199479/9769438/d0b499ea-56ef-11e5-8260-a057c9d726e5.png"><img src="https://cloud.githubusercontent.com/assets/14199479/9769438/d0b499ea-56ef-11e5-8260-a057c9d726e5.png" alt="firefox_screenshot_2015-09-09t17-38-50 565z" style="max-width: 100%;"></a><br>
Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-override-styles-in-subsequent-css" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-override-styles-in-subsequent-css</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">When I loaded the page for this lesson, the 'Hello World" text on the right side of the screen is displayed twice for some reason. If I reset the page, or even start editing the code, the second copy of the text disappears. It's more of a weird error than a bug, but I thought I'd report it since I took a screenshot of it.</p> | <h4 dir="auto">Symmetric Differences</h4>
<p dir="auto"><a href="https://www.freecodecamp.com/challenges/symmetric-difference" rel="nofollow">https://www.freecodecamp.com/challenges/symmetric-difference</a></p>
<h4 dir="auto">Issue Description</h4>
<p dir="auto">Test 5, 7, 9 pass but 6, 8, and 10 do not.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3029437/18227931/555128aa-7204-11e6-9f45-4e21e76a52b8.png"><img src="https://cloud.githubusercontent.com/assets/3029437/18227931/555128aa-7204-11e6-9f45-4e21e76a52b8.png" alt="symdifftests" style="max-width: 100%;"></a></p>
<p dir="auto">It is impossible to return an array of the exact 3 elements the test was expecting and the array also not have a length of 3. I'm assuming there's something wrong in the test cases. Is there not a solution run against these tests to make sure they all pass together?</p> | 0 |
<h3 dir="auto">What happened</h3>
<p dir="auto">When entering a conn_id in the Connections section, there is currently no form validation in place. This allows users to input a conn_id with a space at the end for example, which results in errors when running tasks. The error message displayed states that the connection doesn't exist, which can be misleading and time-consuming to debug.</p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">Form validation should be added to the Connections section to prevent conn_id inputs with trailing spaces from being saved and instead save the conn_id without the trailing spaces.</p>
<h3 dir="auto">How to reproduce</h3>
<ul dir="auto">
<li>Go to the Connections section of the application.</li>
<li>Enter a conn_id with a space at the end.</li>
<li>Save the form or attempt to run a task with the conn_id.</li>
</ul>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Linux - Ubuntu 20.04</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">2.5.1</p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Docker-Compose</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | <h3 dir="auto">Description</h3>
<p dir="auto">I bumped into a bug where a connection id was suffixed with a whitespace e.g. "myconn ". When referencing the connection id "myconn" (without whitespace), you get a connection not found error.</p>
<p dir="auto">To avoid such human errors, I suggest restricting the characters allowed for connection ids.</p>
<p dir="auto">Some suggestions:</p>
<ul dir="auto">
<li>There's an <code class="notranslate">airflow.utils.helpers.validate_key</code> function for validating the DAG id. Probably a good idea to reuse this.</li>
<li>I believe variable ids are also not validated, would be good to check those too.</li>
</ul>
<h3 dir="auto">Use case/motivation</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Related issues</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit a PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | 1 |
<p dir="auto">Update to v6.1.4, require("babel-core/register") is not work:<br>
Error: Cannot find module 'babel-runtime/helpers/interop-require-default'<br>
at Function.Module._resolveFilename (module.js:337:15)<br>
at Function.Module._load (module.js:287:25)<br>
at Module.require (module.js:366:17)<br>
at require (module.js:385:17)<br>
at Object. (xxxx\koa_test\node_modules\babel-register\lib\node.js:5:30)<br>
at Module._compile (module.js:425:26)<br>
at Object.Module._extensions..js (module.js:432:10)<br>
at Module.load (module.js:356:32)<br>
at Function.Module._load (module.js:311:12)<br>
at Module.require (module.js:366:17)</p> | <p dir="auto">I'm using the latest everything:<br>
NodeJS 5.0.0<br>
NPM 3.3.12<br>
babel-runtime 6.1.4<br>
babel-register 6.1.4</p>
<p dir="auto">when running anything with <code class="notranslate">babel-node</code> I get the following errors:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: Cannot find module 'babel-runtime/helpers/interop-require-default'
at Object.<anonymous> (babel-register/lib/node.js:5:30)
Error: Cannot find module 'babel-runtime/helpers/interop-require-wildcard'
at Object.<anonymous> (babel-register/lib/node.js:7:31)"><pre class="notranslate"><code class="notranslate">Error: Cannot find module 'babel-runtime/helpers/interop-require-default'
at Object.<anonymous> (babel-register/lib/node.js:5:30)
Error: Cannot find module 'babel-runtime/helpers/interop-require-wildcard'
at Object.<anonymous> (babel-register/lib/node.js:7:31)
</code></pre></div>
<p dir="auto">The reason this happens is that the files are actually named <code class="notranslate">interopRequireDefault.js</code> and <code class="notranslate">interopRequireWildcard.js</code> respectively.<br>
If I rename them to <code class="notranslate">interop-require-default.js</code> and <code class="notranslate">interop-require-wildcard.js</code> the errors go away.</p>
<p dir="auto">Other than that everything seems to work just fine.</p> | 1 |
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.33]</li>
<li>Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</li>
<li>Other info: Typo in Documentation</li>
</ul>
<h3 dir="auto">Source code</h3>
<p dir="auto">The code for use <a href="https://playwright.dev/docs/test-parallel#serial-mode" rel="nofollow">Serial Mode</a> has a typo</p>
<ul dir="auto">
<li><strong>Actual:</strong> <code class="notranslate">let page: Page; </code></li>
<li><strong>Expected:</strong> <code class="notranslate">let page = Page; </code></li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { test, Page } from '@playwright/test';
// Annotate entire file as serial.
test.describe.configure({ mode: 'serial' });
let page: Page; // <--- here is the typo use = instead of :
test.beforeAll(async ({ browser }) => {
page = await browser.newPage();
});
test.afterAll(async () => {
await page.close();
});
test('runs first', async () => {
await page.goto('https://playwright.dev/');
});
test('runs second', async () => {
await page.getByText('Get Started').click();
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span><span class="pl-kos">,</span> <span class="pl-v">Page</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-c">// Annotate entire file as serial.</span>
<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-c1">describe</span><span class="pl-kos">.</span><span class="pl-en">configure</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">mode</span>: <span class="pl-s">'serial'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> <span class="pl-s1">page</span>: <span class="pl-v">Page</span><span class="pl-kos">;</span> <span class="pl-c">// <--- here is the typo use = instead of :</span>
<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">beforeAll</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> browser <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">afterAll</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'runs first'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">'https://playwright.dev/'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'runs second'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByText</span><span class="pl-kos">(</span><span class="pl-s">'Get Started'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | <p dir="auto">We are in the process of converting our tests from TestCafe to Playwright. We have a test the uses an api to get a password rest email. The response is an html page for the password reset. The api works properly in TestCafe and Postman but returns <Buffer 5b 5d> in Playwright. I tried .body(), .text(), .json() for the response and no luck with any.</p>
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.34.3]</li>
<li>Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/7255854/242435176-5cb647a4-f9a3-48a3-81d5-8a82d7a65fd2.png"><img width="931" alt="image" src="https://user-images.githubusercontent.com/7255854/242435176-5cb647a4-f9a3-48a3-81d5-8a82d7a65fd2.png" style="max-width: 100%;"></a>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const getApiForgotPasswordEmail = await this.apiContext.get(process.env.MAILTRAP_API+'/messages/'+resetEmailId+'/body.html',
{
headers:{
'Accept': 'text/html, application/json',
'Authorization': process.env.MAILTRAP_TOKEN,
},
})
expect(getApiForgotPasswordEmail.ok()).toBeTruthy();
const forgotPasswordEmailResponseCode = await getApiForgotPasswordEmail.status();
console.log(forgotPasswordEmailResponseCode);
const forgotPasswordEmailBody = await getApiForgotPasswordEmail.body();
console.log('email body:');
console.log(forgotPasswordEmailBody);"><pre class="notranslate"><code class="notranslate">const getApiForgotPasswordEmail = await this.apiContext.get(process.env.MAILTRAP_API+'/messages/'+resetEmailId+'/body.html',
{
headers:{
'Accept': 'text/html, application/json',
'Authorization': process.env.MAILTRAP_TOKEN,
},
})
expect(getApiForgotPasswordEmail.ok()).toBeTruthy();
const forgotPasswordEmailResponseCode = await getApiForgotPasswordEmail.status();
console.log(forgotPasswordEmailResponseCode);
const forgotPasswordEmailBody = await getApiForgotPasswordEmail.body();
console.log('email body:');
console.log(forgotPasswordEmailBody);
</code></pre></div>
<ul dir="auto">
<li>[X ] I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<p dir="auto"><strong>Test file (self-contained)</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="await apiUtils.getForgotPasswordEmail(newPatientNumber);"><pre class="notranslate"><code class="notranslate">await apiUtils.getForgotPasswordEmail(newPatientNumber);
</code></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>[Run the test]</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">The html for an email will be returned.</p>
<p dir="auto">This is an example what is returned when the test is ran with TestCafe<br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/7255854/242436330-be718df4-5a58-45ef-900a-1e245aee86b1.png"><img width="606" alt="image" src="https://user-images.githubusercontent.com/7255854/242436330-be718df4-5a58-45ef-900a-1e245aee86b1.png" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">Receive the response <Buffer 5b 5d></p> | 0 |
<h5 dir="auto">ISSUE TYPE</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ec2_group integration test</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">2.5</p>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Shippable</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Unstable integration test ec2_group:</p>
<p dir="auto"><a href="https://app.shippable.com/github/ansible/ansible/runs/54397/66/tests" rel="nofollow">https://app.shippable.com/github/ansible/ansible/runs/54397/66/tests</a></p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Run test on Shippable.</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Tests pass.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Tests are unstable or fail.</p>
<blockquote>
<p dir="auto">test/integration/targets/ec2_group/tasks/main.yml:908 / [localhost] amazon: ec2_group : assert that rule descriptions were modified (expected changed=true) that=[u'result.changed', u'result.ip_permissions_egress|length == 1']</p>
</blockquote>
<blockquote>
<p dir="auto">failure: rc=0</p>
</blockquote>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
"assertion": "result.ip_permissions_egress|length == 1",
"changed": false,
"evaluated_to": false,
"failed": true
}"><pre class="notranslate"><code class="notranslate">{
"assertion": "result.ip_permissions_egress|length == 1",
"changed": false,
"evaluated_to": false,
"failed": true
}
</code></pre></div> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">core</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.0.0 (detached HEAD 5954a82dd6) last updated 2016/05/16 15:32:52 (GMT +300)
lib/ansible/modules/core: (detached HEAD ce79e7c72d) last updated 2016/05/14 22:47:32 (GMT +300)
lib/ansible/modules/extras: (detached HEAD 156a8cd0b3) last updated 2016/05/14 22:47:32 (GMT +300)
config file = /Users/hkariti/repo/bigpanda/playbooks/ansible.cfg
configured module search path = ['library']"><pre class="notranslate"><code class="notranslate">ansible 2.1.0.0 (detached HEAD 5954a82dd6) last updated 2016/05/16 15:32:52 (GMT +300)
lib/ansible/modules/core: (detached HEAD ce79e7c72d) last updated 2016/05/14 22:47:32 (GMT +300)
lib/ansible/modules/extras: (detached HEAD 156a8cd0b3) last updated 2016/05/14 22:47:32 (GMT +300)
config file = /Users/hkariti/repo/bigpanda/playbooks/ansible.cfg
configured module search path = ['library']
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="no_cows=True"><pre class="notranslate"><code class="notranslate">no_cows=True
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Suppose we have a role with variables in the <code class="notranslate">vars/</code> dir and that also includes other tasks files from <code class="notranslate">tasks/</code>.</p>
<p dir="auto">When passing argument to roles the following can happen:</p>
<ol dir="auto">
<li>If the role is used directly, the passed value is used correctly.</li>
<li>If the role is a dependency to another role, and the variable is passed to the second role, the variable will be overridden in <code class="notranslate">main.yml</code>, but not on any included files.</li>
<li>Any other calls to the second role with different parameters will not run, as they are detected as duplicated runs.</li>
</ol>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">roles/parent/vars/main.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="myvar: default"><pre class="notranslate"><code class="notranslate">myvar: default
</code></pre></div>
<p dir="auto">roles/parent/tasks/main.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: from main
debug: var=myvar
- include: other.yml"><pre class="notranslate"><code class="notranslate">- name: from main
debug: var=myvar
- include: other.yml
</code></pre></div>
<p dir="auto">roles/parent/tasks/other.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: from include
debug: var=myvar"><pre class="notranslate"><code class="notranslate">- name: from include
debug: var=myvar
</code></pre></div>
<p dir="auto">roles/child1/meta/main.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dependencies:
- { role: parent, myvar: child_override }"><pre class="notranslate"><code class="notranslate">dependencies:
- { role: parent, myvar: child_override }
</code></pre></div>
<p dir="auto">roles/child2/meta/main.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dependencies:
- { role: parent }"><pre class="notranslate"><code class="notranslate">dependencies:
- { role: parent }
</code></pre></div>
<p dir="auto">cases.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- hosts: localhost
roles:
# These work as intended:
# - { role: parent, myvar: play_override } # Case 1
# - child1 # Case 1 again, now used directly as dependency
# These don't work:
- { role: child2, myvar: play_override } # Case 2, var is overriden outside include only
- { role: child2, myvar: play_override2} # Case 3, won't run at all"><pre class="notranslate"><code class="notranslate">- hosts: localhost
roles:
# These work as intended:
# - { role: parent, myvar: play_override } # Case 1
# - child1 # Case 1 again, now used directly as dependency
# These don't work:
- { role: child2, myvar: play_override } # Case 2, var is overriden outside include only
- { role: child2, myvar: play_override2} # Case 3, won't run at all
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [parent : from main] ******************************************************
ok: [localhost] => {
"myvar": "play_override"
}
TASK [parent : myvar in include] ***********************************************
ok: [localhost] => {
"myvar": "play_override"
}
TASK [parent : from main] ******************************************************
ok: [localhost] => {
"myvar": "play_override2"
}
TASK [parent : myvar in include] ***********************************************
ok: [localhost] => {
"myvar": "play_override2"
}"><pre class="notranslate"><code class="notranslate">TASK [parent : from main] ******************************************************
ok: [localhost] => {
"myvar": "play_override"
}
TASK [parent : myvar in include] ***********************************************
ok: [localhost] => {
"myvar": "play_override"
}
TASK [parent : from main] ******************************************************
ok: [localhost] => {
"myvar": "play_override2"
}
TASK [parent : myvar in include] ***********************************************
ok: [localhost] => {
"myvar": "play_override2"
}
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [parent : from main] ******************************************************
ok: [localhost] => {
"myvar": "play_override"
}
TASK [parent : myvar in include] ***********************************************
ok: [localhost] => {
"myvar": "default"
}"><pre class="notranslate"><code class="notranslate">TASK [parent : from main] ******************************************************
ok: [localhost] => {
"myvar": "play_override"
}
TASK [parent : myvar in include] ***********************************************
ok: [localhost] => {
"myvar": "default"
}
</code></pre></div> | 0 |
<p dir="auto">When the example from the docs <a href="http://penguinwebdevelopment.com/bootstrap-3-docs/components.html#navbar-responsive" rel="nofollow">http://penguinwebdevelopment.com/bootstrap-3-docs/components.html#navbar-responsive</a> is collapsed (i.e. minimizing window width) to the size for phones (when the toggle collapse button appears). If the navbar contains dropdown menu buttons, clicking the dropdown buttons results in a normal dropdown popup vs. the collapse div expanding with more options below the button like in 2.3.2.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/47323a5ed2f125280af49a03816b860ede683a208c7f8cbc9367cf95a0e6e17e/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f333634313033392f3831363130312f35363864663564632d656633392d313165322d386537652d3038383739636430303733382e706e67"><img src="https://camo.githubusercontent.com/47323a5ed2f125280af49a03816b860ede683a208c7f8cbc9367cf95a0e6e17e/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f333634313033392f3831363130312f35363864663564632d656633392d313165322d386537652d3038383739636430303733382e706e67" alt="dropdown" data-canonical-src="https://f.cloud.github.com/assets/3641039/816101/568df5dc-ef39-11e2-8e7e-08879cd00738.png" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/7b95e06af33d775afee14720d071d76cf27d9c125fc1ddb11022bcbd62e35fd5/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f333634313033392f3831363130322f35386166666231632d656633392d313165322d383536332d6566356463316162346465632e706e67"><img src="https://camo.githubusercontent.com/7b95e06af33d775afee14720d071d76cf27d9c125fc1ddb11022bcbd62e35fd5/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f333634313033392f3831363130322f35386166666231632d656633392d313165322d383536332d6566356463316162346465632e706e67" alt="dropdown2" data-canonical-src="https://f.cloud.github.com/assets/3641039/816102/58affb1c-ef39-11e2-8563-ef5dc1ab4dec.png" style="max-width: 100%;"></a></p>
<p dir="auto">Compare functionality to the collapse version of the responsive navbar from <a href="http://twitter.github.io/bootstrap/components.html#navbar" rel="nofollow">http://twitter.github.io/bootstrap/components.html#navbar</a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/6043ef5fc9f7966897be22b2b92bd00b8995be8bf81153f2a95b152537a95b58/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f333634313033392f3831363130392f39633833323639382d656633392d313165322d393939352d3065326636623437383665322e706e67"><img src="https://camo.githubusercontent.com/6043ef5fc9f7966897be22b2b92bd00b8995be8bf81153f2a95b152537a95b58/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f333634313033392f3831363130392f39633833323639382d656633392d313165322d393939352d3065326636623437383665322e706e67" alt="bootstrap2 3 2" data-canonical-src="https://f.cloud.github.com/assets/3641039/816109/9c832698-ef39-11e2-9995-0e2f6b4786e2.png" style="max-width: 100%;"></a></p> | <p dir="auto"><a href="http://bootply.com/render/64786" rel="nofollow">http://bootply.com/render/64786</a></p>
<p dir="auto">When you collapse the navbar at the above example link then the bottom most dropdown sub-menu is hidden when clicked to view the dropdown. Tested on Google Chrome desktop and Ios Safari mobile.</p> | 1 |
<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18363.836
PowerToys version: v0.18.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: 10.0.18363.836
PowerToys version: v0.18.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Open a new window, observe the window size</li>
<li>Snap the window to a FancyZone (like the lower priority zone in the Priority Grid template)</li>
<li>Drag the window to unsnap it</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">On drag/unsnap, the window reverts back to its original size before it was snapped, and subsequent new instances of the app open to the original size.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13860912/82948039-e585a900-9f55-11ea-9f0c-bc3111f6afc8.gif"><img src="https://user-images.githubusercontent.com/13860912/82948039-e585a900-9f55-11ea-9f0c-bc3111f6afc8.gif" alt="Expected" data-animated-image="" style="max-width: 100%;"></a></p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">The window retains the size of the FancyZone. At least for Win32 apps like Edge and Teams, new instances of the app also open to the FancyZone size unless you manually resize the window to the desired size (effectively the original size). UWP apps tend to set a preferred size I guess so new instances don't seem to be as impacted by the sizes of earlier windows. This is different from how Windows Snap works which does preserve the original window size when unsnapping.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13860912/82948064-f1716b00-9f55-11ea-8150-6124ee9a47eb.gif"><img src="https://user-images.githubusercontent.com/13860912/82948064-f1716b00-9f55-11ea-8150-6124ee9a47eb.gif" alt="Actual" data-animated-image="" style="max-width: 100%;"></a></p>
<h1 dir="auto">Additional Notes</h1>
<p dir="auto">When using FancyZones, I find myself needing to resize windows where I never needed to before. This is effectively a regression from Windows Snap.</p> | <p dir="auto">If I have vertical taskbar setup, fancy zones sometimes gets the edge of the screen wrong so that my zones don't take up the full screen. Even if I edit the zone after changing taskbar status.</p>
<p dir="auto">Thanks folks. Chris</p> | 0 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ansible-vault<br>
ansible-playbook</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0.0
config file =
configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.2.0.0
config file =
configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Darwin junction.local 16.1.0 Darwin Kernel Version 16.1.0: Wed Oct 19 20:31:56 PDT 2016; root:xnu-3789.21.4~4/RELEASE_X86_64 x86_64</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">In ansible 2.1 we were using an encrypted inventory to do deployments, see the project here: <a href="https://github.com/MindLeaps/tracker/tree/master/deploy">https://github.com/MindLeaps/tracker/tree/master/deploy</a></p>
<p dir="auto">In ansible 2.2 with the same command, ansible appears to no longer decrypt the inventory. The playbook doesn't match any hosts. If we change the playbook to match <code class="notranslate">all</code> we get an error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [38303030316563383161373464373362663333376565313664316663336337316131]: UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: ControlPath too long\r\n",
"unreachable": true
}"><pre class="notranslate"><code class="notranslate">fatal: [38303030316563383161373464373362663333376565313664316663336337316131]: UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: ControlPath too long\r\n",
"unreachable": true
}
</code></pre></div>
<p dir="auto">It appears to be treating the inventory in its encrypted form as a list of hosts.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Use an encrypted inventory to deploy.</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Expect 2.2 to work as 2.1 did. Encrypted inventories should be decrypted when supplied with the correct password.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="No config file found; using defaults
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default).
This feature will be removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
PLAYBOOK: playbook.yml *********************************************************
1 plays in playbook.yml
PLAY RECAP *********************************************************************"><pre class="notranslate"><code class="notranslate">No config file found; using defaults
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default).
This feature will be removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
PLAYBOOK: playbook.yml *********************************************************
1 plays in playbook.yml
PLAY RECAP *********************************************************************
</code></pre></div>
<p dir="auto">Playbook does not match expected hosts, ignores inventory.</p> | <ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">Ansible Version: ansible 2.2.0.0<br>
Cofiguration: ansible.cfg(in present directory)</p>
<p dir="auto">OS: Ubuntu 14.04 LTS</p>
<p dir="auto">ansible-playbook not able to decrypt the files which encrypted with ansible 2.1.0.0 & below.</p>
<p dir="auto">Steps to reproduce:</p>
<ol dir="auto">
<li>Install ansible 2.1.0.0 or below</li>
<li>Encrypt an inventory file</li>
<li>Add vault_password_file in ansible.cfg</li>
<li>Run, ansible-playbook -i inventory/qa site.yml which works fine.</li>
<li>Now install ansible 2.2.0.0</li>
<li>Run, ansible-playbook -i inventory/qa site.yml which gives below error.</li>
</ol>
<p dir="auto">fatal: [$ANSIBLE_VAULT;1.1;AES256]: UNREACHABLE! => {<br>
"changed": false,<br>
"msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname $ansible_vault;1.1;aes256: Name or service not known\r\n",<br>
"unreachable": true<br>
}</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Plays has to start executing.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Get below error:<br>
fatal: [$ANSIBLE_VAULT;1.1;AES256]: UNREACHABLE! => {<br>
"changed": false,<br>
"msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname $ansible_vault;1.1;aes256: Name or service not known\r\n",<br>
"unreachable": true<br>
}</p> | 1 |
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/factorialize-a-number#?solution=var%20total%20%3D%201%3B%0Afunction%20factorialize%28num%29%20%7B%0A%20%20for%20%28var%20i%3D0%3B%20i%3Cnum%3B%20i%2B%2B%29%7B%0A%20%20%20%20total%20%3D%20total%20*%20%28num%20-%20i%29%3B%0A%20%20%7D%0A%20%20return%20total%3B%0A%7D%0A%0Afactorialize%285%29%3B%0A" rel="nofollow">Factorialize a Number</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var total = 1;
function factorialize(num) {
for (var i=0; i<num; i++){
total = total * (num - i);
}
return total;
}
factorialize(5);
"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">total</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-en">factorialize</span><span class="pl-kos">(</span><span class="pl-s1">num</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">i</span><span class="pl-c1">=</span><span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1"><</span><span class="pl-s1">num</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
<span class="pl-s1">total</span> <span class="pl-c1">=</span> <span class="pl-s1">total</span> <span class="pl-c1">*</span> <span class="pl-kos">(</span><span class="pl-s1">num</span> <span class="pl-c1">-</span> <span class="pl-s1">i</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">return</span> <span class="pl-s1">total</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">factorialize</span><span class="pl-kos">(</span><span class="pl-c1">5</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-sift-through-text-with-regular-expressions" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-sift-through-text-with-regular-expressions</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">"Regular expressions are usually surrounded by / symbols."</p>
<p dir="auto">In JavaScript, when are regular expressions <strong>not</strong> surrounded by forward slashes?</p>
<p dir="auto">"We can do this by replacing the .+ part of our regular expression with the current regular expression with the word and."</p>
<p dir="auto">... may be more clear as:</p>
<p dir="auto">"We can do this by replacing the .+ part of our regular expression with the word and+."</p> | 0 |
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">because we don't include the parentmapper annotation in the _optimized_compare():</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import Column, Integer, Text, ForeignKey, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session, relationship
Base = declarative_base()
class Parent(Base):
__tablename__ = "parent"
id = Column(Integer, primary_key=True)
class Child(Base):
__tablename__ = "child"
_id_parent = Column(
"id_parent", Integer, ForeignKey(Parent.id), primary_key=True)
name = Column(Text, primary_key=True)
parent = relationship(Parent)
engine = create_engine('sqlite://')
Base.metadata.create_all(engine)
session = Session(engine)
p = Parent(id=1)
session.add(p)
session.commit()
c = Child(name="foo", parent=p)
session.add(c)
session.commit()
session.query(Child).filter(Child.parent == p).delete("evaluate")"><pre class="notranslate"><code class="notranslate">from sqlalchemy import Column, Integer, Text, ForeignKey, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session, relationship
Base = declarative_base()
class Parent(Base):
__tablename__ = "parent"
id = Column(Integer, primary_key=True)
class Child(Base):
__tablename__ = "child"
_id_parent = Column(
"id_parent", Integer, ForeignKey(Parent.id), primary_key=True)
name = Column(Text, primary_key=True)
parent = relationship(Parent)
engine = create_engine('sqlite://')
Base.metadata.create_all(engine)
session = Session(engine)
p = Parent(id=1)
session.add(p)
session.commit()
c = Child(name="foo", parent=p)
session.add(c)
session.commit()
session.query(Child).filter(Child.parent == p).delete("evaluate")
</code></pre></div>
<p dir="auto">There are two approaches.</p>
<p dir="auto">One is that we look into getting parentmapper back into PJ/SJ. This was removed a long time ago but we might want to revisit this assumption as mechanics have changed a lot. It would be nice if these annotations were set up at relationship startup time, rather than having to re-inject when we build up relationship comparator operations.</p>
<p dir="auto">The other is probably what we should do here and is just search for the column in the local mapper. We also shouldn't assume ".key" on the clause itself is important, there don't seem to be tests for that case and it should probably raise, so this needs a lot more tests:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="diff --git a/lib/sqlalchemy/orm/evaluator.py b/lib/sqlalchemy/orm/evaluator.py
index 1e828ff..814b28f 100644
--- a/lib/sqlalchemy/orm/evaluator.py
+++ b/lib/sqlalchemy/orm/evaluator.py
@@ -7,6 +7,7 @@
import operator
from ..sql import operators
+from .. import inspect
class UnevaluatableError(Exception):
@@ -28,6 +29,7 @@ _notimplemented_ops = set(getattr(operators, op)
class EvaluatorCompiler(object):
def __init__(self, target_cls=None):
self.target_cls = target_cls
+ self.mapper = inspect(target_cls) if target_cls is not None else None
def process(self, clause):
meth = getattr(self, "visit_%s" % clause.__visit_name__, None)
@@ -58,8 +60,12 @@ class EvaluatorCompiler(object):
parentmapper.class_
)
key = parentmapper._columntoproperty[clause].key
+ elif self.mapper and clause in self.mapper._columntoproperty:
+ key = self.mapper._columntoproperty[clause].key
else:
- key = clause.key
+ raise UnevaluatableError(
+ "Can't evaluate column: %s" % clause
+ )
get_corresponding_attr = operator.attrgetter(key)
return lambda obj: get_corresponding_attr(obj)
diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py
index b649c9e..7ac0ab5 100644
--- a/lib/sqlalchemy/orm/relationships.py
+++ b/lib/sqlalchemy/orm/relationships.py
@@ -1372,6 +1372,7 @@ class RelationshipProperty(StrategizedProperty):
if adapt_source:
criterion = adapt_source(criterion)
+
return criterion
def _lazy_none_clause(self, reverse_direction=False, adapt_source=None):
"><pre class="notranslate"><code class="notranslate">diff --git a/lib/sqlalchemy/orm/evaluator.py b/lib/sqlalchemy/orm/evaluator.py
index 1e828ff..814b28f 100644
--- a/lib/sqlalchemy/orm/evaluator.py
+++ b/lib/sqlalchemy/orm/evaluator.py
@@ -7,6 +7,7 @@
import operator
from ..sql import operators
+from .. import inspect
class UnevaluatableError(Exception):
@@ -28,6 +29,7 @@ _notimplemented_ops = set(getattr(operators, op)
class EvaluatorCompiler(object):
def __init__(self, target_cls=None):
self.target_cls = target_cls
+ self.mapper = inspect(target_cls) if target_cls is not None else None
def process(self, clause):
meth = getattr(self, "visit_%s" % clause.__visit_name__, None)
@@ -58,8 +60,12 @@ class EvaluatorCompiler(object):
parentmapper.class_
)
key = parentmapper._columntoproperty[clause].key
+ elif self.mapper and clause in self.mapper._columntoproperty:
+ key = self.mapper._columntoproperty[clause].key
else:
- key = clause.key
+ raise UnevaluatableError(
+ "Can't evaluate column: %s" % clause
+ )
get_corresponding_attr = operator.attrgetter(key)
return lambda obj: get_corresponding_attr(obj)
diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py
index b649c9e..7ac0ab5 100644
--- a/lib/sqlalchemy/orm/relationships.py
+++ b/lib/sqlalchemy/orm/relationships.py
@@ -1372,6 +1372,7 @@ class RelationshipProperty(StrategizedProperty):
if adapt_source:
criterion = adapt_source(criterion)
+
return criterion
def _lazy_none_clause(self, reverse_direction=False, adapt_source=None):
</code></pre></div> | <p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
<p dir="auto">this is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384633460" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/3365" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/3365/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/3365">#3365</a> but is a more fundamental change.</p>
<p dir="auto">First, test case from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384633460" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/3365" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/3365/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/3365">#3365</a>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import Column, Integer, Text, ForeignKey, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session, relationship
Base = declarative_base()
class Parent(Base):
__tablename__ = "parent"
id = Column(Integer, primary_key=True)
class Child(Base):
__tablename__ = "child"
_id_parent = Column(
"id_parent", Integer, ForeignKey(Parent.id), primary_key=True)
name = Column(Text, primary_key=True)
parent = relationship(Parent)
engine = create_engine('sqlite://')
Base.metadata.create_all(engine)
session = Session(engine)
p = Parent(id=1)
session.add(p)
session.commit()
c = Child(name="foo", parent=p)
session.add(c)
session.commit()
session.query(Child).filter(Child.parent == p).delete("evaluate")"><pre class="notranslate"><code class="notranslate">from sqlalchemy import Column, Integer, Text, ForeignKey, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session, relationship
Base = declarative_base()
class Parent(Base):
__tablename__ = "parent"
id = Column(Integer, primary_key=True)
class Child(Base):
__tablename__ = "child"
_id_parent = Column(
"id_parent", Integer, ForeignKey(Parent.id), primary_key=True)
name = Column(Text, primary_key=True)
parent = relationship(Parent)
engine = create_engine('sqlite://')
Base.metadata.create_all(engine)
session = Session(engine)
p = Parent(id=1)
session.add(p)
session.commit()
c = Child(name="foo", parent=p)
session.add(c)
session.commit()
session.query(Child).filter(Child.parent == p).delete("evaluate")
</code></pre></div>
<p dir="auto">raises: "AttributeError: 'Child' object has no attribute 'id_parent'"</p>
<p dir="auto">with the fix, raises: "sqlalchemy.exc.InvalidRequestError: Could not evaluate current criteria in Python. Specify 'fetch' or False for the synchronize_session parameter."</p>
<p dir="auto">the patch involves adding ORM context to the primaryjoin/secondaryjoin:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="diff --git a/lib/sqlalchemy/orm/evaluator.py b/lib/sqlalchemy/orm/evaluator.py
index 1e828ff..fb59186 100644
--- a/lib/sqlalchemy/orm/evaluator.py
+++ b/lib/sqlalchemy/orm/evaluator.py
@@ -59,7 +59,9 @@ class EvaluatorCompiler(object):
)
key = parentmapper._columntoproperty[clause].key
else:
- key = clause.key
+ raise UnevaluatableError(
+ "Cannot evaluate column: %s" % clause
+ )
get_corresponding_attr = operator.attrgetter(key)
return lambda obj: get_corresponding_attr(obj)
diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py
index b649c9e..291af09 100644
--- a/lib/sqlalchemy/orm/relationships.py
+++ b/lib/sqlalchemy/orm/relationships.py
@@ -1942,6 +1942,7 @@ class JoinCondition(object):
self._annotate_fks()
self._annotate_remote()
self._annotate_local()
+ self._annotate_parentmapper()
self._setup_pairs()
self._check_foreign_cols(self.primaryjoin, True)
if self.secondaryjoin is not None:
@@ -2405,6 +2406,19 @@ class JoinCondition(object):
self.primaryjoin, {}, locals_
)
+ def _annotate_parentmapper(self):
+ if self.prop is None:
+ return
+
+ def parentmappers_(elem):
+ if "remote" in elem._annotations:
+ return elem._annotate({"parentmapper": self.prop.mapper})
+ elif "local" in elem._annotations:
+ return elem._annotate({"parentmapper": self.prop.parent})
+ self.primaryjoin = visitors.replacement_traverse(
+ self.primaryjoin, {}, parentmappers_
+ )
+
def _check_remote_side(self):
if not self.local_remote_pairs:
raise sa_exc.ArgumentError(
@@ -2811,9 +2825,6 @@ class JoinCondition(object):
bind_to_col = dict((binds[col].key, col) for col in binds)
- # this is probably not necessary
- lazywhere = _deep_deannotate(lazywhere)
-
return lazywhere, bind_to_col, equated_columns
"><pre class="notranslate"><code class="notranslate">diff --git a/lib/sqlalchemy/orm/evaluator.py b/lib/sqlalchemy/orm/evaluator.py
index 1e828ff..fb59186 100644
--- a/lib/sqlalchemy/orm/evaluator.py
+++ b/lib/sqlalchemy/orm/evaluator.py
@@ -59,7 +59,9 @@ class EvaluatorCompiler(object):
)
key = parentmapper._columntoproperty[clause].key
else:
- key = clause.key
+ raise UnevaluatableError(
+ "Cannot evaluate column: %s" % clause
+ )
get_corresponding_attr = operator.attrgetter(key)
return lambda obj: get_corresponding_attr(obj)
diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py
index b649c9e..291af09 100644
--- a/lib/sqlalchemy/orm/relationships.py
+++ b/lib/sqlalchemy/orm/relationships.py
@@ -1942,6 +1942,7 @@ class JoinCondition(object):
self._annotate_fks()
self._annotate_remote()
self._annotate_local()
+ self._annotate_parentmapper()
self._setup_pairs()
self._check_foreign_cols(self.primaryjoin, True)
if self.secondaryjoin is not None:
@@ -2405,6 +2406,19 @@ class JoinCondition(object):
self.primaryjoin, {}, locals_
)
+ def _annotate_parentmapper(self):
+ if self.prop is None:
+ return
+
+ def parentmappers_(elem):
+ if "remote" in elem._annotations:
+ return elem._annotate({"parentmapper": self.prop.mapper})
+ elif "local" in elem._annotations:
+ return elem._annotate({"parentmapper": self.prop.parent})
+ self.primaryjoin = visitors.replacement_traverse(
+ self.primaryjoin, {}, parentmappers_
+ )
+
def _check_remote_side(self):
if not self.local_remote_pairs:
raise sa_exc.ArgumentError(
@@ -2811,9 +2825,6 @@ class JoinCondition(object):
bind_to_col = dict((binds[col].key, col) for col in binds)
- # this is probably not necessary
- lazywhere = _deep_deannotate(lazywhere)
-
return lazywhere, bind_to_col, equated_columns
</code></pre></div>
<p dir="auto">We'd just start tracking "parentmapper" throughout all PJ/SJ conditions.</p> | 1 |
<p dir="auto">Hello,</p>
<p dir="auto">It would be nice to have the possibility to do parallel processing using <code class="notranslate">joblib</code> when applying something to a groupby. I'm dreaming about a <code class="notranslate">parallel</code> optional argument which defaults to <code class="notranslate">False</code>.</p>
<p dir="auto">I think it's best to have that parallel argument while grouping</p>
<p dir="auto">The only option I have now is to make list on the groupby results, apply a function on that list using joblib, and concatenate the results. It leads to unefficient and difficult to read code.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
############
# Examples #
############
data.groupby(...).fillna(..., parallel=True)
data.groupby(...).apply(..., parallel=True)
data.groupby(...).whatever(..., parallel=True)
data.groupby(...).whatever(...) # not parallel"><pre class="notranslate"><span class="pl-c">############</span>
<span class="pl-c"># Examples #</span>
<span class="pl-c">############</span>
<span class="pl-s1">data</span>.<span class="pl-en">groupby</span>(...).<span class="pl-en">fillna</span>(..., <span class="pl-s1">parallel</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">data</span>.<span class="pl-en">groupby</span>(...).<span class="pl-en">apply</span>(..., <span class="pl-s1">parallel</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">data</span>.<span class="pl-en">groupby</span>(...).<span class="pl-en">whatever</span>(..., <span class="pl-s1">parallel</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">data</span>.<span class="pl-en">groupby</span>(...).<span class="pl-en">whatever</span>(...) <span class="pl-c"># not parallel</span></pre></div> | <p dir="auto">xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="24587639" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/5751" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/5751/hovercard" href="https://github.com/pandas-dev/pandas/issues/5751">#5751</a></p>
<p dir="auto"><a href="http://stackoverflow.com/questions/37078880/status-of-parallelization-of-pandas-apply?noredirect=1#comment61713215_37078880" rel="nofollow">questions from SO</a>.<br>
<a href="http://stackoverflow.com/questions/31361721/python-dask-dataframe-support-for-trivially-parallelizable-row-apply" rel="nofollow">mrocklins nice example of using .apply</a></p>
<p dir="auto">So here is an example of how to do a parallel apply using <a href="https://dask.readthedocs.io/en/latest/" rel="nofollow">dask</a>. This could be baked into <code class="notranslate">.apply()</code> in pandas by the following signature enhancement:</p>
<p dir="auto">current:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DataFrame.apply(self, func, axis=0, broadcast=False, raw=False, reduce=None,
args=(), **kwds)"><pre class="notranslate"><code class="notranslate">DataFrame.apply(self, func, axis=0, broadcast=False, raw=False, reduce=None,
args=(), **kwds)
</code></pre></div>
<p dir="auto">proposed:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DataFrame.apply(self, func, axis=0, broadcast=False, raw=False, reduce=None,
engine=None, chunksize=None, args=(), **kwds)"><pre class="notranslate"><code class="notranslate">DataFrame.apply(self, func, axis=0, broadcast=False, raw=False, reduce=None,
engine=None, chunksize=None, args=(), **kwds)
</code></pre></div>
<p dir="auto">where <code class="notranslate">engine='dask'</code> (or <code class="notranslate">numba</code> at some point) are possibilities<br>
<code class="notranslate">chunksize</code> would map directly to <code class="notranslate">npartitions</code> and default to the number of cores if not specified.<br>
further would allow <code class="notranslate">engine</code> to be a meta object like <code class="notranslate">Dask(scheduler='multiprocessing')</code> to support other options one would commonly pass (could also move <code class="notranslate">chunksize</code> inside that instead of as a separate object).</p>
<p dir="auto">impl and timings:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from functools import partial
import pandas as pd
import dask
import dask.dataframe as dd
from dask import threaded, multiprocessing
from time import sleep
pd.__version__
dask.__version__
def make_frame(N):
return pd.DataFrame({'A' : range(N)})
def slow_func(x):
sleep(0.5)
return x
df = make_frame(40)
# reg apply
def f1(df):
return df.apply(slow_func, axis=1)
# dask apply
def f2(df, get):
ddf = dd.from_pandas(df, npartitions=8, sort=False)
return ddf.apply(slow_func, columns=df.columns, axis=1).compute(get=get)
f1 = partial(f1, df)
f2_threaded = partial(f2, df, threaded.get)
f2_multi = partial(f2, df, multiprocessing.get)
result1 = f1()
result2 = f2_threaded()
result3 = f2_multi()"><pre class="notranslate"><code class="notranslate">from functools import partial
import pandas as pd
import dask
import dask.dataframe as dd
from dask import threaded, multiprocessing
from time import sleep
pd.__version__
dask.__version__
def make_frame(N):
return pd.DataFrame({'A' : range(N)})
def slow_func(x):
sleep(0.5)
return x
df = make_frame(40)
# reg apply
def f1(df):
return df.apply(slow_func, axis=1)
# dask apply
def f2(df, get):
ddf = dd.from_pandas(df, npartitions=8, sort=False)
return ddf.apply(slow_func, columns=df.columns, axis=1).compute(get=get)
f1 = partial(f1, df)
f2_threaded = partial(f2, df, threaded.get)
f2_multi = partial(f2, df, multiprocessing.get)
result1 = f1()
result2 = f2_threaded()
result3 = f2_multi()
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [18]: result1.equals(result2)
Out[18]: True
In [19]: result1.equals(result3)
Out[19]: True
In [20]: %timeit -n 1 -r 1 f1()
1 loop, best of 1: 20.6 s per loop
In [21]: %timeit -n 1 -r 1 f2_threaded()
1 loop, best of 1: 3.03 s per loop
In [22]: %timeit -n 1 -r 1 f2_multi()
1 loop, best of 1: 3.07 s per loop"><pre class="notranslate"><code class="notranslate">In [18]: result1.equals(result2)
Out[18]: True
In [19]: result1.equals(result3)
Out[19]: True
In [20]: %timeit -n 1 -r 1 f1()
1 loop, best of 1: 20.6 s per loop
In [21]: %timeit -n 1 -r 1 f2_threaded()
1 loop, best of 1: 3.03 s per loop
In [22]: %timeit -n 1 -r 1 f2_multi()
1 loop, best of 1: 3.07 s per loop
</code></pre></div>
<p dir="auto">Now for some caveats.</p>
<p dir="auto">People want to parallelize a poor implementation. Generally you proceed thru the following steps first:</p>
<ul dir="auto">
<li>get your problem correct; optimizing incorrect results is useless</li>
<li>profile profile profile. This is always the first thing to do</li>
<li>use built-in pandas / numpy vectorized routines</li>
<li>use <code class="notranslate">cython</code> or <code class="notranslate">numba</code> on the user defined function</li>
<li><code class="notranslate">.apply</code> is always the last choice</li>
<li>if its still not enough, parallelizaton.</li>
</ul>
<p dir="auto">You always want to make code simpler, not more complex. Its hard to know a-priori where bottlenecks are. People think <code class="notranslate">.apply</code> is some magical thing, its NOT, its JUST A FOR LOOP. The problem is people tend to throw in the kitchen sink, and just everything, which is just a terrible idea.</p>
<p dir="auto">Ok my 2c about optimizing things.</p>
<p dir="auto">In order for parallelization to actually matter the function you are computing should take some non-trivial amount of time to things like:</p>
<ul dir="auto">
<li>iteration costs of the loop</li>
<li>serialization time (esp if using multi-processing / distributed computing)</li>
<li>does the function release the GIL if not, then threading will probably not help much</li>
<li>development resources (your time)</li>
</ul>
<p dir="auto">If these criteria are met, then sure give it a try.</p>
<p dir="auto">I think providing pandas a first class way to parallelize things, even tough people will just naively use it is probably not a bad thing.</p>
<p dir="auto">Further extensions to this are: <code class="notranslate">to_dask()</code> (return a <code class="notranslate">dask.dataframe</code> to the user directly), and <code class="notranslate">engine='dask'</code> syntax for <code class="notranslate">.groupby()</code></p> | 1 |
<p dir="auto"><strong>Migrated issue, originally created by NotTheEvilOne (<a href="https://github.com/NotTheEvilOne">@NotTheEvilOne</a>)</strong></p>
<p dir="auto">Hi,</p>
<p dir="auto">the "autoflush" feature triggers an error in SQLAlchemy 0.9.6.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File "/opt/pas/src/dNG/pas/data/upnp/resources/mp_entry.py", line 588, in init_cds_id
.first()
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/query.py", line 2334, in first
ret = list(self[0:1])
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/query.py", line 2201, in __getitem__
return list(res)
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/query.py", line 2404, in __iter__
self.session._autoflush()
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 1188, in _autoflush
self.flush()
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 1907, in flush
self._flush(objects)
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 2025, in _flush
transaction.rollback(_capture_exception=True)
File "/usr/lib/python3.4/site-packages/sqlalchemy/util/langhelpers.py", line 57, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/lib/python3.4/site-packages/sqlalchemy/util/compat.py", line 172, in reraise
raise value
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 1989, in _flush
flush_context.execute()
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/unitofwork.py", line 350, in execute
postsort_actions = self._generate_actions()
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/unitofwork.py", line 324, in _generate_actions
for rec in cycles
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/unitofwork.py", line 324, in <genexpr>
for rec in cycles
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/unitofwork.py", line 541, in per_state_flush_actions
dep.per_state_flush_actions(uow, states_for_prop, False)
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/dependency.py", line 166, in per_state_flush_actions
else attributes.PASSIVE_NO_INITIALIZE)
TypeError: get_all_pending() takes 3 positional arguments but 4 were given"><pre class="notranslate"><code class="notranslate"> File "/opt/pas/src/dNG/pas/data/upnp/resources/mp_entry.py", line 588, in init_cds_id
.first()
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/query.py", line 2334, in first
ret = list(self[0:1])
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/query.py", line 2201, in __getitem__
return list(res)
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/query.py", line 2404, in __iter__
self.session._autoflush()
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 1188, in _autoflush
self.flush()
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 1907, in flush
self._flush(objects)
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 2025, in _flush
transaction.rollback(_capture_exception=True)
File "/usr/lib/python3.4/site-packages/sqlalchemy/util/langhelpers.py", line 57, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/lib/python3.4/site-packages/sqlalchemy/util/compat.py", line 172, in reraise
raise value
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/session.py", line 1989, in _flush
flush_context.execute()
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/unitofwork.py", line 350, in execute
postsort_actions = self._generate_actions()
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/unitofwork.py", line 324, in _generate_actions
for rec in cycles
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/unitofwork.py", line 324, in <genexpr>
for rec in cycles
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/unitofwork.py", line 541, in per_state_flush_actions
dep.per_state_flush_actions(uow, states_for_prop, False)
File "/usr/lib/python3.4/site-packages/sqlalchemy/orm/dependency.py", line 166, in per_state_flush_actions
else attributes.PASSIVE_NO_INITIALIZE)
TypeError: get_all_pending() takes 3 positional arguments but 4 were given
</code></pre></div>
<p dir="auto">I think it's related to commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/sqlalchemy/sqlalchemy/commit/69dbcdd0ebf8de81643c038276fcc822a7b0bd0b/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/commit/69dbcdd0ebf8de81643c038276fcc822a7b0bd0b"><tt>69dbcdd</tt></a> which in turn is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384630589" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/3060" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/3060/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/3060">#3060</a> as far as I understand.</p>
<p dir="auto">Best regards<br>
Tobias</p> | <p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<p dir="auto">With such scheme:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="exportables = sa.Table(
't_exportable', meta,
sa.Column('object_id', OracleNumber, primary_key=True),
sa.Column('type', sa.String(20), primary_key=True),
sa.Column('state', sa.Integer),
)"><pre class="notranslate"><code class="notranslate">exportables = sa.Table(
't_exportable', meta,
sa.Column('object_id', OracleNumber, primary_key=True),
sa.Column('type', sa.String(20), primary_key=True),
sa.Column('state', sa.Integer),
)
</code></pre></div>
<p dir="auto">and class hierarchy:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class Exportable(Base):
__table__ = exportables
__mapper_args__ = {
'polymorphic_on': exportables.c.type,
}
class ExportableTEST(Exportable):
__mapper_args__ = {
'polymorphic_identity': 'TEST',
}"><pre class="notranslate"><code class="notranslate">class Exportable(Base):
__table__ = exportables
__mapper_args__ = {
'polymorphic_on': exportables.c.type,
}
class ExportableTEST(Exportable):
__mapper_args__ = {
'polymorphic_identity': 'TEST',
}
</code></pre></div>
<p dir="auto">When updating attributes of ExportableTEST object error "''ConcurrentModificationError: Updated rowcount 0 does not match number of objects updated 1''" acquired. Because of primary key is not passed to update query:</p>
<p dir="auto">''INFO:sqlalchemy.engine.base.Engine.0x...fdac:UPDATE t_exportable SET state=:state WHERE t_exportable.opcode = :t_exportable_opcode AND t_exportable.object_id = :t_exportable_object_id AND t_exportable.type = :t_exportable_type<br>
INFO:sqlalchemy.engine.base.Engine.0x...fdac:{'t_exportable_object_id': Decimal("8756"), 'state': 3, 't_exportable_type': None, 't_exportable_opcode': 18}''</p>
<hr>
<p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/1478/mapper.diff">mapper.diff</a></p> | 0 |
<p dir="auto">After installing matplotlib I tried importing pyplot but got the error message below:</p>
<p dir="auto"><code class="notranslate">**RuntimeError**: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends.</code></p>
<p dir="auto">So I followed this solution: <a href="http://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python" rel="nofollow">http://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python</a></p>
<p dir="auto">However, now I'm getting this error</p>
<p dir="auto"><code class="notranslate">ImportError: No module named '_tkinter'</code></p>
<p dir="auto">Here is the entire stacktrace:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="▶ python
Python 3.5.0 (default, Sep 24 2015, 19:45:12)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/pyplot.py", line 114, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/backends/__init__.py", line 32, in pylab_setup
globals(),locals(),[backend_name],0)
File "/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/backends/backend_tkagg.py", line 6, in <module>
from matplotlib.externals.six.moves import tkinter as Tk
File "/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/externals/six.py", line 90, in __get__
result = self._resolve()
File "/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/externals/six.py", line 113, in _resolve
return _import_module(self.mod)
File "/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/externals/six.py", line 80, in _import_module
__import__(name)
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/__init__.py", line 35, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named '_tkinter'"><pre class="notranslate">▶ python
Python 3.5.0 (default, Sep 24 2015, 19:45:12)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type <span class="pl-s"><span class="pl-pds">"</span>help<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>copyright<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>credits<span class="pl-pds">"</span></span> or <span class="pl-s"><span class="pl-pds">"</span>license<span class="pl-pds">"</span></span> <span class="pl-k">for</span> more information.
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
File <span class="pl-s"><span class="pl-pds">"</span><stdin><span class="pl-pds">"</span></span>, line 1, <span class="pl-k">in</span> <span class="pl-k"><</span>module<span class="pl-k">></span>
File <span class="pl-s"><span class="pl-pds">"</span>/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/pyplot.py<span class="pl-pds">"</span></span>, line 114, <span class="pl-k">in</span> <span class="pl-k"><</span>module<span class="pl-k">></span>
_backend_mod, new_figure_manager, draw_if_interactive, _show = <span class="pl-en">pylab_setup</span>()
File <span class="pl-s"><span class="pl-pds">"</span>/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/backends/__init__.py<span class="pl-pds">"</span></span>, line 32, <span class="pl-k">in</span> pylab_setup
<span class="pl-en">globals(),locals</span>(),[backend_name],0)
File <span class="pl-s"><span class="pl-pds">"</span>/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/backends/backend_tkagg.py<span class="pl-pds">"</span></span>, line 6, <span class="pl-k">in</span> <span class="pl-k"><</span>module<span class="pl-k">></span>
from matplotlib.externals.six.moves import tkinter as Tk
File <span class="pl-s"><span class="pl-pds">"</span>/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/externals/six.py<span class="pl-pds">"</span></span>, line 90, <span class="pl-k">in</span> __get__
result = <span class="pl-en">self._resolve</span>()
File <span class="pl-s"><span class="pl-pds">"</span>/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/externals/six.py<span class="pl-pds">"</span></span>, line 113, <span class="pl-k">in</span> _resolve
<span class="pl-k">return</span> _import_module(self.mod)
File <span class="pl-s"><span class="pl-pds">"</span>/Users/bhaarat/.virtualenvs/cv3/lib/python3.5/site-packages/matplotlib-1.5.0rc1+83.g39f0136-py3.5-macosx-10.10-x86_64.egg/matplotlib/externals/six.py<span class="pl-pds">"</span></span>, line 80, <span class="pl-k">in</span> _import_module
__import__(name)
File <span class="pl-s"><span class="pl-pds">"</span>/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/__init__.py<span class="pl-pds">"</span></span>, line 35, <span class="pl-k">in</span> <span class="pl-k"><</span>module<span class="pl-k">></span>
import _tkinter <span class="pl-c"><span class="pl-c">#</span> If this fails your Python may not be configured for Tk</span>
ImportError: No module named <span class="pl-s"><span class="pl-pds">'</span>_tkinter<span class="pl-pds">'</span></span></pre></div> | <p dir="auto">As reported on the mailing list thread "missing ticks in inverted log axis", it seems that the setup.py script favors the Framework Tcl/Tk when building the tkagg extension.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="elif sys.platform == 'darwin':
# this config section lifted directly from Imaging - thanks to
# the effbot!
# First test for a MacOSX/darwin framework install
from os.path import join, exists
framework_dirs = [
join(os.getenv('HOME'), '/Library/Frameworks'),
'/Library/Frameworks',
'/System/Library/Frameworks/',
]"><pre class="notranslate"><code class="notranslate">elif sys.platform == 'darwin':
# this config section lifted directly from Imaging - thanks to
# the effbot!
# First test for a MacOSX/darwin framework install
from os.path import join, exists
framework_dirs = [
join(os.getenv('HOME'), '/Library/Frameworks'),
'/Library/Frameworks',
'/System/Library/Frameworks/',
]
</code></pre></div>
<p dir="auto">I assume this was in here for a reason -- it's been like that for ages. Do any Mac users have any thoughts/solutions?</p>
<p dir="auto">Cc: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pelson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pelson">@pelson</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/r-owen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/r-owen">@r-owen</a></p> | 1 |
<h1 dir="auto">Detail</h1>
<p dir="auto">When I run script, Deno always panics.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import $ from "https://deno.land/x/[email protected]/mod.ts";
const cmds = [];
for (let i = 0; i < 5000; i++) {
cmds.push($`./target/debug/deno_runtime_example`.text());
}
await Promise.all(cmds);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">$</span> <span class="pl-k">from</span> <span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">cmds</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1"><</span> <span class="pl-c1">5000</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">cmds</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-en">$</span><span class="pl-s">`./target/debug/deno_runtime_example`</span><span class="pl-kos">.</span><span class="pl-en">text</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">await</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-en">all</span><span class="pl-kos">(</span><span class="pl-s1">cmds</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=full deno run -A main.ts
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: macos aarch64
Version: 1.28.3
Args: ["deno", "run", "-A", "main.ts"]
thread 'main' panicked at 'internal error: entered unreachable code', runtime/errors.rs:61:19
stack backtrace:
0: 0x101adc7bc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2990a6f24ccff6db
1: 0x101288d7c - core::fmt::write::h91497fd291c8b104
2: 0x101ab2a24 - std::io::Write::write_fmt::h23fa41342cffacf4
3: 0x101ae0b94 - std::panicking::default_hook::{{closure}}::hb41cdb784f4c17ac
4: 0x101ae0858 - std::panicking::default_hook::hdfe992d5fb29a991
5: 0x1011d2fe8 - deno::setup_panic_hook::{{closure}}::h5e935c84e6e3da4b
6: 0x101ae10f0 - std::panicking::rust_panic_with_hook::h2eb0e4b718773521
7: 0x101ae0eb8 - std::panicking::begin_panic_handler::{{closure}}::h06a693206403b4d5
8: 0x101ae0e4c - std::sys_common::backtrace::__rust_end_short_backtrace::h8998defd518dbcad
9: 0x101ae0e28 - _rust_begin_unwind
10: 0x101286f0c - core::panicking::panic_fmt::ha46aa9af97eb193d
11: 0x101288a5c - core::panicking::panic::h5713e7735cef5fa8
12: 0x10158348c - deno_runtime::errors::get_io_error_class::h77396f967b032c77
13: 0x101582fa0 - deno_runtime::errors::get_error_class_name::h42dd95fe507b1825
14: 0x100fdb3b0 - deno::errors::get_error_class_name::h2a9918ddd642a50a
15: 0x10131b200 - deno_core::error::to_v8_error::h406ecfc9d61f68bb
16: 0x10167e340 - deno_runtime::ops::process::op_run::v8_func::h56971477b8014cd2
17: 0x10167940c - <extern "C" fn(A0) .> R as v8::support::CFnFrom<F>>::mapping::c_fn::h78d0641241932d68"><pre class="notranslate">$ RUST_BACKTRACE=full deno run -A main.ts
============================================================
Deno has panicked. This is a bug <span class="pl-k">in</span> Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var <span class="pl-c1">set</span> and include the backtrace <span class="pl-k">in</span> your report.
Platform: macos aarch64
Version: 1.28.3
Args: [<span class="pl-s"><span class="pl-pds">"</span>deno<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>run<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>-A<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>main.ts<span class="pl-pds">"</span></span>]
thread <span class="pl-s"><span class="pl-pds">'</span>main<span class="pl-pds">'</span></span> panicked at <span class="pl-s"><span class="pl-pds">'</span>internal error: entered unreachable code<span class="pl-pds">'</span></span>, runtime/errors.rs:61:19
stack backtrace:
0: 0x101adc7bc - <span class="pl-k"><</span>std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display<span class="pl-k">></span>::fmt::h2990a6f24ccff6db
1: 0x101288d7c - core::fmt::write::h91497fd291c8b104
2: 0x101ab2a24 - std::io::Write::write_fmt::h23fa41342cffacf4
3: 0x101ae0b94 - std::panicking::default_hook::{{closure}}::hb41cdb784f4c17ac
4: 0x101ae0858 - std::panicking::default_hook::hdfe992d5fb29a991
5: 0x1011d2fe8 - deno::setup_panic_hook::{{closure}}::h5e935c84e6e3da4b
6: 0x101ae10f0 - std::panicking::rust_panic_with_hook::h2eb0e4b718773521
7: 0x101ae0eb8 - std::panicking::begin_panic_handler::{{closure}}::h06a693206403b4d5
8: 0x101ae0e4c - std::sys_common::backtrace::__rust_end_short_backtrace::h8998defd518dbcad
9: 0x101ae0e28 - _rust_begin_unwind
10: 0x101286f0c - core::panicking::panic_fmt::ha46aa9af97eb193d
11: 0x101288a5c - core::panicking::panic::h5713e7735cef5fa8
12: 0x10158348c - deno_runtime::errors::get_io_error_class::h77396f967b032c77
13: 0x101582fa0 - deno_runtime::errors::get_error_class_name::h42dd95fe507b1825
14: 0x100fdb3b0 - deno::errors::get_error_class_name::h2a9918ddd642a50a
15: 0x10131b200 - deno_core::error::to_v8_error::h406ecfc9d61f68bb
16: 0x10167e340 - deno_runtime::ops::process::op_run::v8_func::h56971477b8014cd2
17: 0x10167940c - <span class="pl-k"><</span>extern <span class="pl-s"><span class="pl-pds">"</span>C<span class="pl-pds">"</span></span> fn(A0) .<span class="pl-k">></span> R as v8::support::CFnFrom<span class="pl-k"><</span>F<span class="pl-k">>></span>::mapping::c_fn::h78d0641241932d68</pre></div>
<h2 dir="auto">How to reproduce</h2>
<p dir="auto">At first, please clone this repository.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ git clone https://github.com/skanehira/deno_runtime_example
$ cargo build"><pre class="notranslate">$ git clone https://github.com/skanehira/deno_runtime_example
$ cargo build</pre></div>
<p dir="auto">And add this script at project root directory.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import $ from "https://deno.land/x/[email protected]/mod.ts";
const cmds = [];
for (let i = 0; i < 5000; i++) {
cmds.push($`./target/debug/deno_runtime_example`.text());
}
await Promise.all(cmds);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">$</span> <span class="pl-k">from</span> <span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">cmds</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1"><</span> <span class="pl-c1">5000</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">cmds</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-en">$</span><span class="pl-s">`./target/debug/deno_runtime_example`</span><span class="pl-kos">.</span><span class="pl-en">text</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">await</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-en">all</span><span class="pl-kos">(</span><span class="pl-s1">cmds</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Run script and we got panic.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno run -A main.ts"><pre class="notranslate">deno run -A main.ts</pre></div> | <p dir="auto">How to use http2 protocol client and server in deno?</p> | 0 |
<p dir="auto">I have found a bug in pure Go resolver that causes Dial to fail even though correct responses are returned from the server. This problem manifested itself as a failure when trying to search for docker images in docker 1.9.1 built on go1.4.3:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DEBU[0003] Calling GET /v1.21/images/search
INFO[0003] GET /v1.21/images/search?term=phusion
DEBU[0003] hostDir: /etc/docker/certs.d/docker.io
DEBU[0003] pinging registry endpoint https://index.docker.io/v1/
DEBU[0003] attempting v1 ping for registry endpoint https://index.docker.io/v1/
DEBU[0003] Index server: https://index.docker.io/v1/
ERRO[0003] Handler for GET /v1.21/images/search returned error: Get https://index.docker.io/v1/search?q=phusion: dial tcp: lookup index.docker.io on x.x.x.x:53: no such host
ERRO[0003] HTTP Error err=Get https://index.docker.io/v1/search?q=phusion: dial tcp: lookup index.docker.io on x.x.x.x:53: no such host statusCode=404"><pre class="notranslate"><code class="notranslate">DEBU[0003] Calling GET /v1.21/images/search
INFO[0003] GET /v1.21/images/search?term=phusion
DEBU[0003] hostDir: /etc/docker/certs.d/docker.io
DEBU[0003] pinging registry endpoint https://index.docker.io/v1/
DEBU[0003] attempting v1 ping for registry endpoint https://index.docker.io/v1/
DEBU[0003] Index server: https://index.docker.io/v1/
ERRO[0003] Handler for GET /v1.21/images/search returned error: Get https://index.docker.io/v1/search?q=phusion: dial tcp: lookup index.docker.io on x.x.x.x:53: no such host
ERRO[0003] HTTP Error err=Get https://index.docker.io/v1/search?q=phusion: dial tcp: lookup index.docker.io on x.x.x.x:53: no such host statusCode=404
</code></pre></div>
<p dir="auto">Similar issues are <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="107693835" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/12712" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/12712/hovercard" href="https://github.com/golang/go/issues/12712">#12712</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="108766360" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/12778" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/12778/hovercard" href="https://github.com/golang/go/issues/12778">#12778</a></p>
<p dir="auto">I have tested go1.3.0 and it did not exhibit this problem, but at least 1.4.3, 1.5.1 and 1.5.2 are affected.</p>
<p dir="auto">Tested using the following code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
)
func main() {
resp, err := http.Get(os.Args[1])
if err != nil {
log.Fatal(err)
}
page, err := ioutil.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s", page)
}"><pre class="notranslate"><code class="notranslate">package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
)
func main() {
resp, err := http.Get(os.Args[1])
if err != nil {
log.Fatal(err)
}
page, err := ioutil.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s", page)
}
</code></pre></div>
<p dir="auto"><strong>Note - we only run an IPv4 stack. IPv6 is disabled on the client</strong></p>
<h2 dir="auto">Test fails with pure Go resolver</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# /tmp/fetch-1.5.2 https://index.docker.io/v1/search?q=phusion
2015/12/10 12:17:42 Get https://index.docker.io/v1/search?q=phusion: dial tcp: lookup index.docker.io on x.x.x.x:53: no such host
# docker search phusion
Error response from daemon: Get https://index.docker.io/v1/search?q=phusion: dial tcp: lookup index.docker.io on x.x.x.x:53: no such host"><pre class="notranslate"><code class="notranslate"># /tmp/fetch-1.5.2 https://index.docker.io/v1/search?q=phusion
2015/12/10 12:17:42 Get https://index.docker.io/v1/search?q=phusion: dial tcp: lookup index.docker.io on x.x.x.x:53: no such host
# docker search phusion
Error response from daemon: Get https://index.docker.io/v1/search?q=phusion: dial tcp: lookup index.docker.io on x.x.x.x:53: no such host
</code></pre></div>
<p dir="auto">DNS packet capture: <a href="https://github.com/golang/go/files/57660/PureGO_correct_but_fails.txt">PureGO_correct_but_fails.txt</a></p>
<p dir="auto">Here we see the AAAA response contains only CNAME RRs but no AAAA RRs. The resolver queries all 4 name servers and all 4 responses contain CNAME and A RRs which the resolver ignores. It then searches using the search domain (from <code class="notranslate">/etc/resolv.conf</code>) appended, finally determining that the host cannot be found.</p>
<h2 dir="auto">Test succeeds when forced to use cGo resolver</h2>
<p dir="auto">(By setting LOCALDOMAIN in the environment, as described <a href="https://golang.org/pkg/net/" rel="nofollow">in the docs</a>)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# LOCALDOMAIN= /tmp/fetch-1.5.2 https://index.docker.io/v1/search?q=phusion
{"num_pages": 11, "num_results": 257, "results": [{"is_automated": true, ..."><pre class="notranslate"><code class="notranslate"># LOCALDOMAIN= /tmp/fetch-1.5.2 https://index.docker.io/v1/search?q=phusion
{"num_pages": 11, "num_results": 257, "results": [{"is_automated": true, ...
</code></pre></div>
<p dir="auto">DNS packet capture: <a href="https://github.com/golang/go/files/57661/CGO_correct_but_succeeds.txt">CGO_correct_but_succeeds.txt</a></p>
<p dir="auto">Here we see the same AAAA and A RRs are returned but this time the resolver accepts the A records and the dial call succeeds.</p>
<h2 dir="auto">Summary</h2>
<p dir="auto">The name server returns correct responses for both A and AAAA queries but the pure Go resolver ignores the A response records when the AAAA response contains no RRs.</p>
<p dir="auto">I would have also expected that since IPv6 is disabled, querying for AAAA records is redundant, but the C library does it too. That may be because many hosts will have both stacks enabled but only have IPv4 routing configured so querying AAAA may be valid and successful but will require an A query anyway. Unfortunately that means the DNS server's load gets doubled for every address resolution.</p>
<h2 dir="auto">Recommendations</h2>
<ul dir="auto">
<li>Review section <strong>3. Expected Behaviour</strong> of <a href="https://www.ietf.org/rfc/rfc4074.txt" rel="nofollow">RFC4074</a></li>
<li>Enable AAAA queries only if the IPv6 stack is enabled</li>
</ul> | <pre class="notranslate"><a href="https://golang.org/issue/6336" rel="nofollow">issue #6336</a> unveiled that we need minimum DNS transport support in build-in DNS resolver
for when we cannot rely on underlying stuff such as libc. For now, looks like EDNS0 is
the only missing piece.</pre> | 1 |
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/1520" rel="nofollow">http://projects.scipy.org/scipy/ticket/1520</a> on 2011-09-15 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/stefanv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/stefanv">@stefanv</a>, assigned to unknown.</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def shift(input, shift):
"""
Shift an array like scipy.ndimage.interpolation.shift(input, shift, mode="wrap", order=0) but faster
@param in: 2d numpy array
@param d: 2-tuple of integers=20
@return: shifted image
"""
re = numpy.zeros_like(input)
s0, s1 = input.shape
d0 = shift[0] % s0
d1 = shift[1] % s1
r0 = (-d0) % s0
r1 = (-d1) % s1
re[d0:, d1:] = input[:r0, :r1]
re[:d0, d1:] = input[r0:, :r1]
re[d0:, :d1] = input[:r0, r1:]
re[:d0, :d1] = input[r0:, r1:]
return re
a=np.arange(12).reshape((3,4))
print "Input:\n", a, "\n"
print "Ndimage:\n", interpolation.shift(a, (1, 1), mode="wrap", order=0), "\n"
print "Custom:\n", shift(a, (1, 1)), "\n""><pre class="notranslate"><code class="notranslate">def shift(input, shift):
"""
Shift an array like scipy.ndimage.interpolation.shift(input, shift, mode="wrap", order=0) but faster
@param in: 2d numpy array
@param d: 2-tuple of integers=20
@return: shifted image
"""
re = numpy.zeros_like(input)
s0, s1 = input.shape
d0 = shift[0] % s0
d1 = shift[1] % s1
r0 = (-d0) % s0
r1 = (-d1) % s1
re[d0:, d1:] = input[:r0, :r1]
re[:d0, d1:] = input[r0:, :r1]
re[d0:, :d1] = input[:r0, r1:]
re[:d0, :d1] = input[r0:, r1:]
return re
a=np.arange(12).reshape((3,4))
print "Input:\n", a, "\n"
print "Ndimage:\n", interpolation.shift(a, (1, 1), mode="wrap", order=0), "\n"
print "Custom:\n", shift(a, (1, 1)), "\n"
</code></pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Input:
[[ 0 1 2 3]
[ 4 5 6 7]
[ 8 9 10 11]]
Ndimage:
[[6 4 5 6]
[2 0 1 2]
[6 4 5 6]]
Custom:
[[11 8 9 10]
[ 3 0 1 2]
[ 7 4 5 6]] "><pre class="notranslate"><code class="notranslate">Input:
[[ 0 1 2 3]
[ 4 5 6 7]
[ 8 9 10 11]]
Ndimage:
[[6 4 5 6]
[2 0 1 2]
[6 4 5 6]]
Custom:
[[11 8 9 10]
[ 3 0 1 2]
[ 7 4 5 6]]
</code></pre></div> | <p dir="auto">This already includes the mailmap updates currently in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="898898589" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/14110" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/14110/hovercard" href="https://github.com/scipy/scipy/pull/14110">#14110</a>.</p>
<p dir="auto">If you see a duplicated/incomplete/incorrectly formatted name, feel free to suggest the appropriate change or GitHub handle to ping.</p>
<p dir="auto">I've been having to manually deleted a "user" named <code class="notranslate">GitHub</code> for the last several releases--not sure where that is getting injected from, but not a big deal anyway.</p>
<h1 dir="auto">Authors</h1>
<ul dir="auto">
<li><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/endolith/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/endolith">@endolith</a></li>
<li>Jelle Aalbers +</li>
<li>Adam +</li>
<li>Tania Allard +</li>
<li>Sven Baars +</li>
<li>Max Balandat +</li>
<li>baumgarc +</li>
<li>Christoph Baumgarten</li>
<li>Peter Bell</li>
<li>Lilian Besson</li>
<li>Robinson Besson +</li>
<li>Max Bolingbroke</li>
<li>Blair Bonnett +</li>
<li>Jordão Bragantini</li>
<li>Harm Buisman +</li>
<li>Evgeni Burovski</li>
<li>Matthias Bussonnier</li>
<li>Dominic C</li>
<li>CJ Carey</li>
<li>Ramón Casero +</li>
<li>charlotte12l +</li>
<li>Benjamin Curtice Corbett +</li>
<li>Falcon Dai +</li>
<li>Ian Dall +</li>
<li>Terry Davis</li>
<li>droussea2001 +</li>
<li>DWesl +</li>
<li>dwight200 +</li>
<li>Thomas J. Fan +</li>
<li>Joseph Fox-Rabinovitz</li>
<li>Max Frei +</li>
<li>Laura Gutierrez Funderburk +</li>
<li>gbonomib +</li>
<li>Matthias Geier +</li>
<li>Pradipta Ghosh +</li>
<li>GitHub</li>
<li>Ralf Gommers</li>
<li>Evan H +</li>
<li>h-vetinari</li>
<li>Matt Haberland</li>
<li>Anselm Hahn +</li>
<li>Alex Henrie</li>
<li>Piet Hessenius +</li>
<li>Elisha Hollander +</li>
<li>Stephan Hoyer</li>
<li>Tom Hu +</li>
<li>Kei Ishikawa +</li>
<li>Julien Jerphanion</li>
<li>Robert Kern</li>
<li>Shashank KS +</li>
<li>Peter Mahler Larsen</li>
<li>Eric Larson</li>
<li>Cheng H. Lee +</li>
<li>Gregory R. Lee</li>
<li>Jean-Benoist Leger +</li>
<li>lgfunderburk +</li>
<li>liam-o-marsh +</li>
<li>Xingyu Liu +</li>
<li>Alex Loftus +</li>
<li>Christian Lorentzen +</li>
<li>Cong Ma</li>
<li>Marc +</li>
<li>MarkPundurs +</li>
<li>Markus Löning +</li>
<li>Liam Marsh +</li>
<li>Nicholas McKibben</li>
<li>Jamie Morton</li>
<li>Andrew Nelson</li>
<li>Nikola Forró</li>
<li>Tor Nordam +</li>
<li>Olivier Gauthé +</li>
<li>Rohit Pandey +</li>
<li>Tirth Patel</li>
<li>paugier +</li>
<li>Alex H. Wagner, PhD +</li>
<li>Jeff Plourde +</li>
<li>Ilhan Polat</li>
<li>Vladyslav Rachek</li>
<li>Bharat Raghunathan</li>
<li>Recursing +</li>
<li>Tyler Reddy</li>
<li>Lucas Roberts</li>
<li>Gregor Robinson +</li>
<li>Pamphile Roy +</li>
<li>Atsushi Sakai</li>
<li>Benjamin Santos</li>
<li>Martin K. Scherer +</li>
<li>Thomas Schmelzer +</li>
<li>Daniel Scott +</li>
<li>Sebastian Wallkötter +</li>
<li>serge-sans-paille +</li>
<li>Namami Shanker +</li>
<li>Masashi Shibata +</li>
<li>Alexandre de Siqueira +</li>
<li>Albert Steppi +</li>
<li>Adam J. Stewart +</li>
<li>Kai Striega</li>
<li>Søren Fuglede Jørgensen</li>
<li>Mike Taves</li>
<li>Dan Temkin +</li>
<li>Robert Uhl</li>
<li>christos val +</li>
<li>Bas van Beek +</li>
<li>Ashutosh Varma +</li>
<li>Sebastiano Vigna</li>
<li>Aditya Vijaykumar</li>
<li>VNMabus</li>
<li>Arthur Volant +</li>
<li>Samuel Wallan</li>
<li>Stefan van der Walt</li>
<li>Warren Weckesser</li>
<li>Anreas Weh</li>
<li>Josh Wilson</li>
<li>Rory Yorke</li>
<li>Marc Zoeller +</li>
<li>zoj613 +</li>
<li>秋纫 +</li>
</ul>
<p dir="auto">A total of 117 people contributed to this release.<br>
People with a "+" by their names contributed a patch for the first time.<br>
This list of names is automatically generated, and may not be fully complete.</p>
<p dir="auto">NOTE: Check this list manually! It is automatically generated and some names<br>
may be missing.</p> | 0 |
<h3 dir="auto">First Check</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I added a very descriptive title to this issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I used the GitHub search to find a similar issue and didn't find it.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I searched the FastAPI documentation, with the integrated search.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already searched in Google "How to X in FastAPI" and didn't find any information.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already read and followed all the tutorial in the docs and didn't find an answer.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/samuelcolvin/pydantic">Pydantic</a>.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/swagger-api/swagger-ui">Swagger UI</a>.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/Redocly/redoc">ReDoc</a>.</li>
</ul>
<h3 dir="auto">Commit to Help</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I commit to help with one of those options <g-emoji class="g-emoji" alias="point_up_2" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f446.png">👆</g-emoji></li>
</ul>
<h3 dir="auto">Example Code</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from __future__ import annotations
from dataclasses import dataclass, field
from fastapi import Depends, FastAPI
from pydantic import BaseModel
from sqlalchemy import Column, ForeignKey, Integer, String, create_engine
from sqlalchemy.orm import Session, registry, relationship, sessionmaker
from uvicorn import run
SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db"
engine = create_engine(
SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
mapper = registry()
@mapper.mapped
@dataclass
class User:
__tablename__ = "users"
__sa_dataclass_metadata_key__ = "sa"
id: int = field(
metadata={
"sa": Column(Integer, primary_key=True, index=True)
}
)
email: str = field(
metadata={
"sa": Column(String, unique=True, index=True)
}
)
items: list[Item] = field(
init=False,
metadata={
"sa": relationship("Item", lazy="raise")
}
)
@property
def greeting(self):
return f"Hello {self.email}"
@mapper.mapped
@dataclass
class Item:
__tablename__ = "items"
__sa_dataclass_metadata_key__ = "sa"
id: int = field(
metadata={
"sa": Column(Integer, primary_key=True, index=True)
}
)
title: str = field(
metadata={
"sa": Column(String, index=True)
}
)
owner_id: int = field(
init=False,
metadata={
"sa": Column(Integer, ForeignKey("users.id"))
}
)
class UserIn(BaseModel):
id: int
email: str
class UserOut(BaseModel):
id: int
email: str
greeting: str
class Config:
orm_mode = True
mapper.metadata.create_all(bind=engine)
app = FastAPI()
def get_db():
db = SessionLocal()
try:
yield db
finally:
db.close()
@app.post("/users/", response_model=UserOut)
def create_user(user: UserIn, db: Session = Depends(get_db)):
instance = User(
id=user.id,
email=user.email
)
db.add(instance)
db.commit()
return instance
if __name__ == '__main__':
run(app)"><pre class="notranslate"><span class="pl-k">from</span> __future__ <span class="pl-k">import</span> <span class="pl-s1">annotations</span>
<span class="pl-k">from</span> <span class="pl-s1">dataclasses</span> <span class="pl-k">import</span> <span class="pl-s1">dataclass</span>, <span class="pl-s1">field</span>
<span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">Depends</span>, <span class="pl-v">FastAPI</span>
<span class="pl-k">from</span> <span class="pl-s1">pydantic</span> <span class="pl-k">import</span> <span class="pl-v">BaseModel</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-v">Column</span>, <span class="pl-v">ForeignKey</span>, <span class="pl-v">Integer</span>, <span class="pl-v">String</span>, <span class="pl-s1">create_engine</span>
<span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">orm</span> <span class="pl-k">import</span> <span class="pl-v">Session</span>, <span class="pl-s1">registry</span>, <span class="pl-s1">relationship</span>, <span class="pl-s1">sessionmaker</span>
<span class="pl-k">from</span> <span class="pl-s1">uvicorn</span> <span class="pl-k">import</span> <span class="pl-s1">run</span>
<span class="pl-v">SQLALCHEMY_DATABASE_URL</span> <span class="pl-c1">=</span> <span class="pl-s">"sqlite:///./sql_app.db"</span>
<span class="pl-s1">engine</span> <span class="pl-c1">=</span> <span class="pl-en">create_engine</span>(
<span class="pl-v">SQLALCHEMY_DATABASE_URL</span>, <span class="pl-s1">connect_args</span><span class="pl-c1">=</span>{<span class="pl-s">"check_same_thread"</span>: <span class="pl-c1">False</span>}
)
<span class="pl-v">SessionLocal</span> <span class="pl-c1">=</span> <span class="pl-en">sessionmaker</span>(<span class="pl-s1">autocommit</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">autoflush</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, <span class="pl-s1">bind</span><span class="pl-c1">=</span><span class="pl-s1">engine</span>)
<span class="pl-s1">mapper</span> <span class="pl-c1">=</span> <span class="pl-en">registry</span>()
<span class="pl-en">@<span class="pl-s1">mapper</span>.<span class="pl-s1">mapped</span></span>
<span class="pl-en">@<span class="pl-s1">dataclass</span></span>
<span class="pl-k">class</span> <span class="pl-v">User</span>:
<span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">"users"</span>
<span class="pl-s1">__sa_dataclass_metadata_key__</span> <span class="pl-c1">=</span> <span class="pl-s">"sa"</span>
<span class="pl-s1">id</span>: <span class="pl-s1">int</span> <span class="pl-c1">=</span> <span class="pl-en">field</span>(
<span class="pl-s1">metadata</span><span class="pl-c1">=</span>{
<span class="pl-s">"sa"</span>: <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
}
)
<span class="pl-s1">email</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-en">field</span>(
<span class="pl-s1">metadata</span><span class="pl-c1">=</span>{
<span class="pl-s">"sa"</span>: <span class="pl-v">Column</span>(<span class="pl-v">String</span>, <span class="pl-s1">unique</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
}
)
<span class="pl-s1">items</span>: <span class="pl-s1">list</span>[<span class="pl-v">Item</span>] <span class="pl-c1">=</span> <span class="pl-en">field</span>(
<span class="pl-s1">init</span><span class="pl-c1">=</span><span class="pl-c1">False</span>,
<span class="pl-s1">metadata</span><span class="pl-c1">=</span>{
<span class="pl-s">"sa"</span>: <span class="pl-en">relationship</span>(<span class="pl-s">"Item"</span>, <span class="pl-s1">lazy</span><span class="pl-c1">=</span><span class="pl-s">"raise"</span>)
}
)
<span class="pl-en">@<span class="pl-s1">property</span></span>
<span class="pl-k">def</span> <span class="pl-en">greeting</span>(<span class="pl-s1">self</span>):
<span class="pl-k">return</span> <span class="pl-s">f"Hello <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">self</span>.<span class="pl-s1">email</span><span class="pl-kos">}</span></span>"</span>
<span class="pl-en">@<span class="pl-s1">mapper</span>.<span class="pl-s1">mapped</span></span>
<span class="pl-en">@<span class="pl-s1">dataclass</span></span>
<span class="pl-k">class</span> <span class="pl-v">Item</span>:
<span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">"items"</span>
<span class="pl-s1">__sa_dataclass_metadata_key__</span> <span class="pl-c1">=</span> <span class="pl-s">"sa"</span>
<span class="pl-s1">id</span>: <span class="pl-s1">int</span> <span class="pl-c1">=</span> <span class="pl-en">field</span>(
<span class="pl-s1">metadata</span><span class="pl-c1">=</span>{
<span class="pl-s">"sa"</span>: <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-s1">primary_key</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
}
)
<span class="pl-s1">title</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-en">field</span>(
<span class="pl-s1">metadata</span><span class="pl-c1">=</span>{
<span class="pl-s">"sa"</span>: <span class="pl-v">Column</span>(<span class="pl-v">String</span>, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
}
)
<span class="pl-s1">owner_id</span>: <span class="pl-s1">int</span> <span class="pl-c1">=</span> <span class="pl-en">field</span>(
<span class="pl-s1">init</span><span class="pl-c1">=</span><span class="pl-c1">False</span>,
<span class="pl-s1">metadata</span><span class="pl-c1">=</span>{
<span class="pl-s">"sa"</span>: <span class="pl-v">Column</span>(<span class="pl-v">Integer</span>, <span class="pl-v">ForeignKey</span>(<span class="pl-s">"users.id"</span>))
}
)
<span class="pl-k">class</span> <span class="pl-v">UserIn</span>(<span class="pl-v">BaseModel</span>):
<span class="pl-s1">id</span>: <span class="pl-s1">int</span>
<span class="pl-s1">email</span>: <span class="pl-s1">str</span>
<span class="pl-k">class</span> <span class="pl-v">UserOut</span>(<span class="pl-v">BaseModel</span>):
<span class="pl-s1">id</span>: <span class="pl-s1">int</span>
<span class="pl-s1">email</span>: <span class="pl-s1">str</span>
<span class="pl-s1">greeting</span>: <span class="pl-s1">str</span>
<span class="pl-k">class</span> <span class="pl-v">Config</span>:
<span class="pl-s1">orm_mode</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>
<span class="pl-s1">mapper</span>.<span class="pl-s1">metadata</span>.<span class="pl-en">create_all</span>(<span class="pl-s1">bind</span><span class="pl-c1">=</span><span class="pl-s1">engine</span>)
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>()
<span class="pl-k">def</span> <span class="pl-en">get_db</span>():
<span class="pl-s1">db</span> <span class="pl-c1">=</span> <span class="pl-v">SessionLocal</span>()
<span class="pl-k">try</span>:
<span class="pl-k">yield</span> <span class="pl-s1">db</span>
<span class="pl-k">finally</span>:
<span class="pl-s1">db</span>.<span class="pl-en">close</span>()
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">post</span>(<span class="pl-s">"/users/"</span>, <span class="pl-s1">response_model</span><span class="pl-c1">=</span><span class="pl-v">UserOut</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">create_user</span>(<span class="pl-s1">user</span>: <span class="pl-v">UserIn</span>, <span class="pl-s1">db</span>: <span class="pl-v">Session</span> <span class="pl-c1">=</span> <span class="pl-v">Depends</span>(<span class="pl-s1">get_db</span>)):
<span class="pl-s1">instance</span> <span class="pl-c1">=</span> <span class="pl-v">User</span>(
<span class="pl-s1">id</span><span class="pl-c1">=</span><span class="pl-s1">user</span>.<span class="pl-s1">id</span>,
<span class="pl-s1">email</span><span class="pl-c1">=</span><span class="pl-s1">user</span>.<span class="pl-s1">email</span>
)
<span class="pl-s1">db</span>.<span class="pl-en">add</span>(<span class="pl-s1">instance</span>)
<span class="pl-s1">db</span>.<span class="pl-en">commit</span>()
<span class="pl-k">return</span> <span class="pl-s1">instance</span>
<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>:
<span class="pl-en">run</span>(<span class="pl-s1">app</span>)</pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">Example code works if <code class="notranslate">fastapi==0.66.1</code> and it does not work if <code class="notranslate">fastapi==0.67.0</code>.<br>
Open a browser, hit <code class="notranslate">POST /users/</code> endpoint and create a user</p>
<p dir="auto">Expected behaviour: User is created and displayed successfully.<br>
Current behavior: User is created successfully (check in DB), but is not displayed successfully due to serialization errors.</p>
<p dir="auto">Most likely the reason is in the new dataclass related features of FastAPI 0.67.0. Since the new-style database models are dataclasses as well, therefore they are affected too. As far as I can see if an instance is the dataclass, then FastAPI makes a <code class="notranslate">dict</code> (<code class="notranslate">dataclasses.asdict(res)</code>) out of instance before doing serialization.<br>
It has two issues: first, if a dataclass has a property, it won't be serialized; second, if a dataclass has a relationship with <code class="notranslate">lazy="raise"</code> (means we should load this relationship explicitly), it is actually accessed and caused SQLAlchemy's exception.<br>
Technically, if we let <code class="notranslate">pydantic</code> to serialize this dataclass, we won't get any of those issues. I assume it was the case for previous versions of FastAPI.</p>
<p dir="auto">Here are a few links:<br>
<a href="https://docs.sqlalchemy.org/en/14/orm/mapping_styles.html#orm-declarative-dataclasses-declarative-table" rel="nofollow">https://docs.sqlalchemy.org/en/14/orm/mapping_styles.html#orm-declarative-dataclasses-declarative-table</a><br>
<a href="https://docs.sqlalchemy.org/en/14/orm/loading_relationships.html#prevent-lazy-with-raiseload" rel="nofollow">https://docs.sqlalchemy.org/en/14/orm/loading_relationships.html#prevent-lazy-with-raiseload</a></p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Windows</p>
<h3 dir="auto">Operating System Details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">FastAPI Version</h3>
<p dir="auto">0.67.0</p>
<h3 dir="auto">Python Version</h3>
<p dir="auto">3.9.6</p>
<h3 dir="auto">Additional Context</h3>
<p dir="auto"><em>No response</em></p> | <p dir="auto"><a href="https://github.com/tortoise/tortoise-orm">https://github.com/tortoise/tortoise-orm</a></p> | 0 |
<p dir="auto">Traceback (most recent call last):<br>
File "/usr/local/lib/python2.7/dist-packages/scrapy/core/downloader/middleware.py", line 43, in process_request<br>
defer.returnValue((yield download_func(request=request,spider=spider)))<br>
ValueError: invalid hostname: advisors-dev-mra-2333_profile_update.swarm.cxawsnprd.massmutual.com<br>
ERROR:scrapy.core.scraper:Error downloading <GET <a href="https://advisors-dev-mra-2333_profile_update.swarm.cxawsnprd.massmutual.com/shealyn-mcgaffey%3E" rel="nofollow">https://advisors-dev-mra-2333_profile_update.swarm.cxawsnprd.massmutual.com/shealyn-mcgaffey></a></p>
<p dir="auto">Scrapy : 1.3.0<br>
lxml : 4.2.5.0<br>
libxml2 : 2.9.8<br>
cssselect : 1.0.3<br>
parsel : 1.5.0<br>
w3lib : 1.19.0<br>
Twisted : 18.7.0<br>
Python : 2.7.15rc1 (default, Apr 15 2018, 21:51:34) - [GCC 7.3.0]<br>
pyOpenSSL : 18.0.0 (OpenSSL 1.1.0i 14 Aug 2018)</p> | <p dir="auto">I have url with invalid hostname - it does not match IDNA standards. Scrapy fails with that.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="scrapy fetch "https://mediaworld_it_api2.frosmo.com/?method=products&products=[%22747190%22]"
2018-07-06 11:53:09 [scrapy.core.scraper] ERROR: Error downloading <GET https://mediaworld_it_api2.frosmo.com/?method=products&products=[%22747190%22]>
Traceback (most recent call last):
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/pawel/scrapy/scrapy/core/downloader/middleware.py", line 43, in process_request
defer.returnValue((yield download_func(request=request,spider=spider)))
File "/home/pawel//scrapy/scrapy/utils/defer.py", line 45, in mustbe_deferred
result = f(*args, **kw)
File "/home/pawel/scrapy/scrapy/core/downloader/handlers/__init__.py", line 65, in download_request
return handler.download_request(request, spider)
File "/home/pawel/scrapy/scrapy/core/downloader/handlers/http11.py", line 67, in download_request
return agent.download_request(request)
File "/home/pawelscrapy/scrapy/core/downloader/handlers/http11.py", line 331, in download_request
method, to_bytes(url, encoding='ascii'), headers, bodyproducer)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/web/client.py", line 1649, in request
endpoint = self._getEndpoint(parsedURI)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/web/client.py", line 1633, in _getEndpoint
return self._endpointFactory.endpointForURI(uri)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/web/client.py", line 1510, in endpointForURI
uri.port)
File "/home/pawel/scrapy/scrapy/core/downloader/contextfactory.py", line 59, in creatorForNetloc
return ScrapyClientTLSOptions(hostname.decode("ascii"), self.getContext())
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1152, in __init__
self._hostnameBytes = _idnaBytes(hostname)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/internet/_idna.py", line 30, in _idnaBytes
return idna.encode(text)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/idna/core.py", line 355, in encode
result.append(alabel(label))
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/idna/core.py", line 265, in alabel
raise IDNAError('The label {0} is not a valid A-label'.format(label))
IDNAError: The label mediaworld_it_api2 is not a valid A-label"><pre class="notranslate"><code class="notranslate">scrapy fetch "https://mediaworld_it_api2.frosmo.com/?method=products&products=[%22747190%22]"
2018-07-06 11:53:09 [scrapy.core.scraper] ERROR: Error downloading <GET https://mediaworld_it_api2.frosmo.com/?method=products&products=[%22747190%22]>
Traceback (most recent call last):
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/pawel/scrapy/scrapy/core/downloader/middleware.py", line 43, in process_request
defer.returnValue((yield download_func(request=request,spider=spider)))
File "/home/pawel//scrapy/scrapy/utils/defer.py", line 45, in mustbe_deferred
result = f(*args, **kw)
File "/home/pawel/scrapy/scrapy/core/downloader/handlers/__init__.py", line 65, in download_request
return handler.download_request(request, spider)
File "/home/pawel/scrapy/scrapy/core/downloader/handlers/http11.py", line 67, in download_request
return agent.download_request(request)
File "/home/pawelscrapy/scrapy/core/downloader/handlers/http11.py", line 331, in download_request
method, to_bytes(url, encoding='ascii'), headers, bodyproducer)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/web/client.py", line 1649, in request
endpoint = self._getEndpoint(parsedURI)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/web/client.py", line 1633, in _getEndpoint
return self._endpointFactory.endpointForURI(uri)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/web/client.py", line 1510, in endpointForURI
uri.port)
File "/home/pawel/scrapy/scrapy/core/downloader/contextfactory.py", line 59, in creatorForNetloc
return ScrapyClientTLSOptions(hostname.decode("ascii"), self.getContext())
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1152, in __init__
self._hostnameBytes = _idnaBytes(hostname)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/twisted/internet/_idna.py", line 30, in _idnaBytes
return idna.encode(text)
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/idna/core.py", line 355, in encode
result.append(alabel(label))
File "/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/idna/core.py", line 265, in alabel
raise IDNAError('The label {0} is not a valid A-label'.format(label))
IDNAError: The label mediaworld_it_api2 is not a valid A-label
</code></pre></div>
<p dir="auto">IDNA error is legitmate. This url <a href="https://mediaworld_it_api2.frosmo.com/?method=products&products=%5B%22747190%22%5D" rel="nofollow">https://mediaworld_it_api2.frosmo.com/?method=products&products=[%22747190%22]</a> is not valid according to IDNA standard.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: x = "https://mediaworld_it_api2.frosmo.com/?method=products&products=[%22747190%22]"
In [2]: import idna
In [3]: idna.encode(x)
---------------------------------------------------------------------------
IDNAError Traceback (most recent call last)
<ipython-input-3-c97070e17b57> in <module>()
----> 1 idna.encode(x)
/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/idna/core.pyc in encode(s, strict, uts46, std3_rules, transitional)
353 trailing_dot = True
354 for label in labels:
--> 355 result.append(alabel(label))
356 if trailing_dot:
357 result.append(b'')
/home/pawel/.virtualenvs/scrapy/local/lib/python2.7/site-packages/idna/core.pyc in alabel(label)
263 ulabel(label)
264 except IDNAError:
--> 265 raise IDNAError('The label {0} is not a valid A-label'.format(label))
266 if not valid_label_length(label):
267 raise IDNAError('Label too long')
IDNAError: The label https://mediaworld_it_api2 is not a valid A-label
"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s">"https://mediaworld_it_api2.frosmo.com/?method=products&products=[%22747190%22]"</span>
<span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">import</span> <span class="pl-s1">idna</span>
<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">idna</span>.<span class="pl-en">encode</span>(<span class="pl-s1">x</span>)
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">IDNAError</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-c1"><</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">c97070e17b57</span><span class="pl-c1">></span> <span class="pl-s1">in</span> <span class="pl-c1"><</span><span class="pl-s1">module</span><span class="pl-c1">></span>()
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">1</span> <span class="pl-s1">idna</span>.<span class="pl-en">encode</span>(<span class="pl-s1">x</span>)
<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">pawel</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">scrapy</span><span class="pl-c1">/</span><span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">idna</span><span class="pl-c1">/</span><span class="pl-s1">core</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">encode</span>(<span class="pl-s1">s</span>, <span class="pl-s1">strict</span>, <span class="pl-s1">uts46</span>, <span class="pl-s1">std3_rules</span>, <span class="pl-s1">transitional</span>)
<span class="pl-c1">353</span> <span class="pl-s1">trailing_dot</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>
<span class="pl-c1">354</span> <span class="pl-k">for</span> <span class="pl-s1">label</span> <span class="pl-c1">in</span> <span class="pl-s1">labels</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">355</span> <span class="pl-s1">result</span>.<span class="pl-en">append</span>(<span class="pl-en">alabel</span>(<span class="pl-s1">label</span>))
<span class="pl-c1">356</span> <span class="pl-k">if</span> <span class="pl-s1">trailing_dot</span>:
<span class="pl-c1">357</span> <span class="pl-s1">result</span>.<span class="pl-en">append</span>(<span class="pl-s">b''</span>)
<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">pawel</span><span class="pl-c1">/</span>.<span class="pl-s1">virtualenvs</span><span class="pl-c1">/</span><span class="pl-s1">scrapy</span><span class="pl-c1">/</span><span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python2</span>.<span class="pl-c1">7</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">idna</span><span class="pl-c1">/</span><span class="pl-s1">core</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">alabel</span>(<span class="pl-s1">label</span>)
<span class="pl-c1">263</span> <span class="pl-s1">ulabel</span>(<span class="pl-s1">label</span>)
<span class="pl-c1">264</span> <span class="pl-k">except</span> <span class="pl-v">IDNAError</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">></span> <span class="pl-c1">265</span> <span class="pl-s1">raise</span> <span class="pl-v">IDNAError</span>(<span class="pl-s">'The label {0} is not a valid A-label'</span>.<span class="pl-en">format</span>(<span class="pl-s1">label</span>))
<span class="pl-c1">266</span> <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-en">valid_label_length</span>(<span class="pl-s1">label</span>):
<span class="pl-c1">267</span> <span class="pl-s1">raise</span> <span class="pl-v">IDNAError</span>(<span class="pl-s">'Label too long'</span>)
<span class="pl-v">IDNAError</span>: <span class="pl-v">The</span> <span class="pl-s1">label</span> <span class="pl-s1">https</span>:<span class="pl-c1">//</span><span class="pl-s1">mediaworld_it_api2</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-s1">a</span> <span class="pl-s1">valid</span> <span class="pl-v">A</span><span class="pl-c1">-</span><span class="pl-s1">label</span>
</pre></div>
<p dir="auto">How should scrapy handle this url? Should we download it regardless of validity?</p> | 1 |
<h3 dir="auto">First check</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I used the GitHub search to find a similar issue and didn't find it.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I searched the FastAPI documentation, with the integrated search.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already searched in Google "How to X in FastAPI" and didn't find any information.</li>
</ul>
<h3 dir="auto">Description</h3>
<p dir="auto">Is it possible to somehow globally filter response that is returned from a route method? What I have in mind if there is any proper way to additionally filter response based on some context, or FastAPI dependencies (<code class="notranslate">Dependency</code>, <code class="notranslate">Security</code> etc.).</p>
<p dir="auto">My use case is:</p>
<ul dir="auto">
<li>I have some authorization mechanism with different roles (let's say <code class="notranslate">admin</code> and <code class="notranslate">user</code> for simplicity).</li>
<li>Data is typical CRUD model stored in the database, and all records have boolean <code class="notranslate">active</code> column to handle "soft" delete and not remove records entirely from the database. If record was "soft" deleted the flag would be set to <code class="notranslate">false</code>.</li>
<li>As user with <code class="notranslate">admin</code> role I can access all records, even if they were "soft" deleted, and <code class="notranslate">user</code> role can only access the ones that have been not "soft" deleted.</li>
<li>Record from database is represented by pydantic model:</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class MyModel(BaseModel):
id: str
name: str
active: bool = True"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">MyModel</span>(<span class="pl-v">BaseModel</span>):
<span class="pl-s1">id</span>: <span class="pl-s1">str</span>
<span class="pl-s1">name</span>: <span class="pl-s1">str</span>
<span class="pl-s1">active</span>: <span class="pl-s1">bool</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span></pre></div>
<ul dir="auto">
<li>I have some route defined which fetches a model from database and returns it:</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="async def get_model(
id: str = Path(...),
current_user: User = Depends(get_current_user)
) -> MyModel:
# The `current_user` will be a model representing currently authorized user.
# In case of admin user inactive record might also be returned here.
return await fetch_model_from_db(id, user.is_admin())"><pre class="notranslate"><span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">get_model</span>(
<span class="pl-s1">id</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-v">Path</span>(...),
<span class="pl-s1">current_user</span>: <span class="pl-v">User</span> <span class="pl-c1">=</span> <span class="pl-v">Depends</span>(<span class="pl-s1">get_current_user</span>)
) <span class="pl-c1">-></span> <span class="pl-v">MyModel</span>:
<span class="pl-c"># The `current_user` will be a model representing currently authorized user. </span>
<span class="pl-c"># In case of admin user inactive record might also be returned here.</span>
<span class="pl-k">return</span> <span class="pl-k">await</span> <span class="pl-en">fetch_model_from_db</span>(<span class="pl-s1">id</span>, <span class="pl-s1">user</span>.<span class="pl-en">is_admin</span>())</pre></div>
<ul dir="auto">
<li>The output model will have the attribute <code class="notranslate">active</code> present in any case, but I want to only preserve it for admin user and hide it from regular <code class="notranslate">user</code> role (it can access only records with <code class="notranslate">active</code> flag as <code class="notranslate">true</code> anyway). In short I would like to additionally parse response based on <code class="notranslate">current_user</code> role.</li>
</ul>
<h3 dir="auto">What I found</h3>
<p dir="auto">First thing I thought about was excluding certain attributes as per docummentation <a href="https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter" rel="nofollow">https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter</a> but this only allows excluding attributes explicitly without any additional context.</p>
<p dir="auto">Then I thought about making custom middleware, which serves the purpose of processing response object before it is returned to the client, but I couldn't find a clear way to pass down the context as <code class="notranslate">current_user</code>, so I could use that to process response and exclude unwanted attributes from response body. This however would add additional overhead as the response body is already serialized at this stage and would need to be deserialized -> filtered -> serialized again.</p>
<h3 dir="auto">Additional context</h3>
<p dir="auto">I could add additional function like this and call it as the last thing in every route, but it's way too verbose and I'd rather handle it more generic way:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def filter_admin_attributes(input: Dict, is_admin: bool, attributes: Set[str]) -> Dict:
return {k: v for k, v in input.items() if not is_admin and k in attributes}
async def get_model(
id: str = Path(...),
current_user: User = Depends(get_current_user)
) -> Dict:
# The `current_user` will be a model representing currently authorized user.
# In case of admin user inactive record might also be returned here.
result = await fetch_model_from_db(id, user.is_admin())
return filter_admin_attributes(result.dict(), user.is_admin(), {'active',})"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">filter_admin_attributes</span>(<span class="pl-s1">input</span>: <span class="pl-v">Dict</span>, <span class="pl-s1">is_admin</span>: <span class="pl-s1">bool</span>, <span class="pl-s1">attributes</span>: <span class="pl-v">Set</span>[<span class="pl-s1">str</span>]) <span class="pl-c1">-></span> <span class="pl-v">Dict</span>:
<span class="pl-k">return</span> {<span class="pl-s1">k</span>: <span class="pl-s1">v</span> <span class="pl-k">for</span> <span class="pl-s1">k</span>, <span class="pl-s1">v</span> <span class="pl-c1">in</span> <span class="pl-s1">input</span>.<span class="pl-en">items</span>() <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-s1">is_admin</span> <span class="pl-c1">and</span> <span class="pl-s1">k</span> <span class="pl-c1">in</span> <span class="pl-s1">attributes</span>}
<span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">get_model</span>(
<span class="pl-s1">id</span>: <span class="pl-s1">str</span> <span class="pl-c1">=</span> <span class="pl-v">Path</span>(...),
<span class="pl-s1">current_user</span>: <span class="pl-v">User</span> <span class="pl-c1">=</span> <span class="pl-v">Depends</span>(<span class="pl-s1">get_current_user</span>)
) <span class="pl-c1">-></span> <span class="pl-v">Dict</span>:
<span class="pl-c"># The `current_user` will be a model representing currently authorized user. </span>
<span class="pl-c"># In case of admin user inactive record might also be returned here.</span>
<span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">fetch_model_from_db</span>(<span class="pl-s1">id</span>, <span class="pl-s1">user</span>.<span class="pl-en">is_admin</span>())
<span class="pl-k">return</span> <span class="pl-en">filter_admin_attributes</span>(<span class="pl-s1">result</span>.<span class="pl-en">dict</span>(), <span class="pl-s1">user</span>.<span class="pl-en">is_admin</span>(), {<span class="pl-s">'active'</span>,})</pre></div> | <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from fastapi import FastAPI, Query
app = FastAPI()
@app.get('/sprints/')
async def get_sprints(userID: int, numOfSprints: int = Query(..., ge=1, lt=100)):
[...]
return answer"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">FastAPI</span>, <span class="pl-v">Query</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>()
<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">'/sprints/'</span>)</span>
<span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">get_sprints</span>(<span class="pl-s1">userID</span>: <span class="pl-s1">int</span>, <span class="pl-s1">numOfSprints</span>: <span class="pl-s1">int</span> <span class="pl-c1">=</span> <span class="pl-v">Query</span>(..., <span class="pl-s1">ge</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">lt</span><span class="pl-c1">=</span><span class="pl-c1">100</span>)):
[...]
<span class="pl-k">return</span> <span class="pl-s1">answer</span></pre></div>
<p dir="auto">is applied, if numOfSprints is more than 99, response is: 422 Unprocessable Entity</p>
<p dir="auto">but in swagger documentation isnt clear about limit:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/20581667/113487747-1447a680-94ba-11eb-977a-e04500b512fe.png"><img src="https://user-images.githubusercontent.com/20581667/113487747-1447a680-94ba-11eb-977a-e04500b512fe.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">python 3.8<br>
latest fastapi</p> | 0 |
<p dir="auto">I defined a class:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export class TCommand<TSender, TParam, TThis>
{
}"><pre class="notranslate"><code class="notranslate">export class TCommand<TSender, TParam, TThis>
{
}
</code></pre></div>
<p dir="auto">and created an alias for the closed type:</p>
<p dir="auto">export type Command = TCommand<any, any, any>;</p>
<p dir="auto">now when i try:</p>
<p dir="auto">export class NextCommand extends Command {<br>
}</p>
<p dir="auto">the compiler says: Error 1 Cannot find name 'Command'</p>
<p dir="auto">var cmd = new MOD.mvvm.Command();</p>
<p dir="auto">Produces the same error<br>
but i can write</p>
<p dir="auto">var cmd: Command = null;</p>
<p dir="auto">without errors,</p>
<p dir="auto">Expected: to allow using this type alias for inheritance purposes.<br>
The problem is that Typescript creates not a true alias<br>
it produces in the output:</p>
<pre class="notranslate">var NextCommand = (function (_super) {
__extends(NextCommand, _super);
function NextCommand() {
_super.apply(this, arguments);
}
return NextCommand;
})(Command); /// notice Command is not defined.
</pre>
<p dir="auto">but it should produce</p>
<pre class="notranslate">var NextCommand = (function (_super) {
__extends(NextCommand, _super);
function NextCommand() {
_super.apply(this, arguments);
}
return NextCommand;
})(TCommand); /// notice Command is replaced with original TCommand
</pre>
<p dir="auto">That means - we don't need new definitions in the output for alias, but alias should be replaced with the original definition in the output!</p> | <p dir="auto">Currently a type aliased class <a href="https://github.com/Microsoft/TypeScript/issues/2552" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/2552/hovercard">cannot be instantiated</a>. Also there is no way to alias a <a href="https://github.com/Microsoft/TypeScript/issues/1616" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/1616/hovercard">type with type parameters</a>. Please consider making type aliases as capable as the types that they represent, basically capturing the type expression under a different name.</p> | 1 |
<p dir="auto">Hi<br>
I need to pretrain the bert on one dataset and finetune it then on other datasets, so basically<br>
removing classifier from first part and substitute it with a new one with the specific number of<br>
labels, currently with current codes, it will be error to do it when loading pretrained model,<br>
could you please assist me how I can do this? I have a deadline soon and really appreciate your help urgently.<br>
thanks<br>
Best<br>
Julia</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="model = model_class.from_pretrained(args.model_name_or_path, from_tf=bool('.ckpt' in args.model_name_or_path), config=config)"><pre class="notranslate"><code class="notranslate">model = model_class.from_pretrained(args.model_name_or_path, from_tf=bool('.ckpt' in args.model_name_or_path), config=config)
</code></pre></div>
<p dir="auto">File "julia/libs/anaconda3/envs/transformers/lib/python3.5/site-packages/pytorch_transformers/modeling_utils.py", line 461, in from_pretrained<br>
model.<strong>class</strong>.<strong>name</strong>, "\n\t".join(error_msgs)))<br>
RuntimeError: Error(s) in loading state_dict for BertRUBIForSequenceClassification:<br>
size mismatch for classifier.weight: copying a param with shape torch.Size([174, 768]) from checkpoint, the shape in current model is torch.Size([3, 768]).<br>
size mismatch for classifier.bias: copying a param with shape torch.Size([174]) from checkpoint, the shape in current model is torch.Size([3]).</p> | <p dir="auto">I am using the following version of transformer, datasets and huggingface_hub.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/77198742/232941383-cc398bb4-88c0-4a12-9ff1-c59f8c5aa1a6.png"><img src="https://user-images.githubusercontent.com/77198742/232941383-cc398bb4-88c0-4a12-9ff1-c59f8c5aa1a6.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I am running into the following error:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" NameError: name 'PartialState' is not defined."><pre class="notranslate"> NameError: name <span class="pl-s"><span class="pl-pds">'</span>PartialState<span class="pl-pds">'</span></span> is not defined.</pre></div>
<p dir="auto">How to resolve this issue to work with my versions of the transformer, datasets and huggingface_hub ?<br>
My code was running just fine until yesterday.</p> | 0 |
<p dir="auto">Challenge [Change the Font Size of an Element]</p>
<p dir="auto"><strong>Do not add a class attribute to the second p element, without removing it from the first one</strong></p>
<p dir="auto">Countless members in chat read this as moving the class attribute from one </p><p dir="auto"> to the other. Just drop the second phrase starting with ", without".</p> | <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/change-the-font-size-of-an-element#?solution=%3Cstyle%3E%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%20%20%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%3Cp%3EKitty%20ipsum%20dolor%20sit%20amet%2C%20shed%20everywhere%20shed%20everywhere%20stretching%20attack%20your%20ankles%20chase%20the%20red%20dot%2C%20hairball%20run%20catnip%20eat%20the%20grass%20sniff.%3C%2Fp%3E%0A%0A%3Cp%3EPurr%20jump%20eat%20the%20grass%20rip%20the%20couch%20scratched%20sunbathe%2C%20shed%20everywhere%20rip%20the%20couch%20sleep%20in%20the%20sink%20fluffy%20fur%20catnip%20scratched.%3C%2Fp%3E%0A" rel="nofollow">Change the Font Size of an Element</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36</code>.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<style>
.red-text {
color: red;
}
p {
font-size: 16px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">style</span><span class="pl-kos">></span>
.<span class="pl-c1">red-text</span> {
<span class="pl-c1">color</span><span class="pl-kos">:</span> red;
}
<span class="pl-ent">p</span> {
<span class="pl-c1">font-size</span><span class="pl-kos">:</span> <span class="pl-c1">16<span class="pl-smi">px</span></span>;
}
<span class="pl-kos"></</span><span class="pl-ent">style</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">h2</span> <span class="pl-c1">class</span>="<span class="pl-s">red-text</span>"<span class="pl-kos">></span>CatPhotoApp<span class="pl-kos"></</span><span class="pl-ent">h2</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">p</span><span class="pl-kos">></span>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.<span class="pl-kos"></</span><span class="pl-ent">p</span><span class="pl-kos">></span></pre></div>
<p dir="auto">When removing class atribute from both p elements, one of the tests is not passing, and the error is:</p>
<blockquote>
<p dir="auto">Do not add a class attribute to the second p element, without removing it from the first<br>
one.</p>
</blockquote>
<p dir="auto">The description is misleading.<br>
I think better say something like:</p>
<blockquote>
<p dir="auto">Do not add a class attribute to the second p element.<br>
First p element should have a class attribute and it's content should remain red.</p>
</blockquote> | 1 |
<p dir="auto">by <strong>blake.mizerany</strong>:</p>
<pre class="notranslate">Per email from Brad:
It looks like what you don't actually care about owning the TCP connection and ideally
just want something like:
var clientClosed chan bool
cn, ok := w.(http.CloseNotifier)
if ok {
clientClosed = cn.CloseChannel() // returns a chan bool, written to when/if this http request is closed
}
select {
case <-clientClosed:
// cancel expensive stuff
case ....
}
<a href="https://groups.google.com/d/topic/golang-nuts/PcEvewBB-AQ/discussion" rel="nofollow">https://groups.google.com/d/topic/golang-nuts/PcEvewBB-AQ/discussion</a></pre> | <pre class="notranslate">The current testing package documentation states:
"These TestXxx routines should be declared within the package they are
testing."
There's no mention of the commonly used technique of creating a file with
package foo_test
instead of
package foo
for blackbox or example purposes.</pre> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="t1 = Variable(torch.rand(3, 3))
t2 = Variable(torch.rand(3, 3))
print(t1 > t2)
Variable containing:
0 1 0
0 1 0
0 1 0
[torch.ByteTensor of size 3x3]
print((t1 > t2) * (t1 < t2))
Variable containing:
0 0 0
0 0 0
0 0 0
[torch.ByteTensor of size 3x3]
print((t1 > t2) & (t1 < t2))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-55-b70196d4c8b9> in <module>()
----> 1 print((t1 > t2) & (t1 < t2))
TypeError: unsupported operand type(s) for &: 'Variable' and 'Variable'"><pre class="notranslate"><code class="notranslate">t1 = Variable(torch.rand(3, 3))
t2 = Variable(torch.rand(3, 3))
print(t1 > t2)
Variable containing:
0 1 0
0 1 0
0 1 0
[torch.ByteTensor of size 3x3]
print((t1 > t2) * (t1 < t2))
Variable containing:
0 0 0
0 0 0
0 0 0
[torch.ByteTensor of size 3x3]
print((t1 > t2) & (t1 < t2))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-55-b70196d4c8b9> in <module>()
----> 1 print((t1 > t2) & (t1 < t2))
TypeError: unsupported operand type(s) for &: 'Variable' and 'Variable'
</code></pre></div>
<p dir="auto">Same goes for <code class="notranslate">+</code> being used in place of <code class="notranslate">|</code>.</p> | <p dir="auto">High Priority:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">repeat</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">split</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">std</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">var</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">renorm</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">eq</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">ge</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">gt</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">le</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">lt</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">ne</code></li>
</ul>
<p dir="auto">Mid Priority:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">cross</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">cumsum</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">trace</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">unfold</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">cumprod</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">atan2</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">__and__</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">__bool__</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">__iand__</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">__ior__</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">__ixor__</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">__mod__</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">__nonzero__</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">__or__</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">__xor__</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">cauchy</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">exponential</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">fill</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">geometric</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">log_normal</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">normal</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">ones</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">random</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">uniform</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">zero</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">zeros</code></li>
</ul>
<p dir="auto">Wontfix (as in very very low priority, but PRs are welcome!):</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">gesv</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">inverse</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">potrf</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">svd</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">trtrs</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">orgqr</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">ormqr</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">potri</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">potrs</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">pstrf</code> [NOW DEFUNCT]</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">qr</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">symeig</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">eig</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">gels</code></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">geqrf</code></li>
</ul> | 1 |
<p dir="auto">Reproduction steps:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ flutter create delete_me
$ cd delete_me
$ flutter run"><pre class="notranslate"><code class="notranslate">$ flutter create delete_me
$ cd delete_me
$ flutter run
</code></pre></div>
<p dir="auto">Got this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Launching lib/main.dart on Nexus 7 in debug mode...
Running 'gradle assembleDebug'...
Checking the license for package Android SDK Build-Tools 25.0.2 in /usr/local/google/home/johnmccutchan/Android/Sdk/licenses
Warning: License for package Android SDK Build-Tools 25.0.2 not accepted.
Checking the license for package Android SDK Platform 25 in /usr/local/google/home/johnmccutchan/Android/Sdk/licenses
Warning: License for package Android SDK Platform 25 not accepted.
FAILURE: Build failed with an exception.
* Where:
Build file '/usr/local/google/home/johnmccutchan/delete_me/android/build.gradle' line: 20
* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 25.0.2, Android SDK Platform 25].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
> Could not get unknown property 'compileDebugJavaWithJavac' for project ':app' of type org.gradle.api.Project.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output."><pre class="notranslate"><code class="notranslate">Launching lib/main.dart on Nexus 7 in debug mode...
Running 'gradle assembleDebug'...
Checking the license for package Android SDK Build-Tools 25.0.2 in /usr/local/google/home/johnmccutchan/Android/Sdk/licenses
Warning: License for package Android SDK Build-Tools 25.0.2 not accepted.
Checking the license for package Android SDK Platform 25 in /usr/local/google/home/johnmccutchan/Android/Sdk/licenses
Warning: License for package Android SDK Platform 25 not accepted.
FAILURE: Build failed with an exception.
* Where:
Build file '/usr/local/google/home/johnmccutchan/delete_me/android/build.gradle' line: 20
* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 25.0.2, Android SDK Platform 25].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
> Could not get unknown property 'compileDebugJavaWithJavac' for project ':app' of type org.gradle.api.Project.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
</code></pre></div>
<ol dir="auto">
<li>'android' and ':app' are meaningless to me.</li>
<li>Failed to notify project evaluation listener. -- what?</li>
<li>You have not accepted the license agreements of the following SDK components:</li>
</ol>
<p dir="auto"><code class="notranslate">Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager. Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html</code></p>
<p dir="auto">I have no idea how to install these components or how accept the license agreement.</p>
<ol start="4" dir="auto">
<li>
<p dir="auto"><code class="notranslate">> Could not get unknown property 'compileDebugJavaWithJavac' for project ':app' of type org.gradle.api.Project.</code> -- what?</p>
</li>
<li>
<p dir="auto"><code class="notranslate">* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.</code></p>
</li>
</ol>
<p dir="auto">I tried running with <code class="notranslate">--info</code> and got:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ flutter run --info
Could not find an option named "info".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options."><pre class="notranslate"><code class="notranslate">$ flutter run --info
Could not find an option named "info".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
</code></pre></div> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ flutter run
Launching lib/main.dart on Nexus 6 in debug mode...
Running 'gradle assembleDebug'...
Checking the license for package Android SDK Build-Tools 24.0.1 in /usr/local/google/home/ianh/Android/Sdk/licenses
Warning: License for package Android SDK Build-Tools 24.0.1 not accepted.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 24.0.1].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
> Could not get unknown property 'compileDebugJavaWithJavac' for project ':app' of type org.gradle.api.Project.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Exception from flutter run: Exception: Gradle build failed: 1
package:flutter_tools/src/base/common.dart 29 throwToolExit
package:flutter_tools/src/android/gradle.dart 183 buildGradleProjectV2
package:flutter_tools/src/android/gradle.dart 133 buildGradleProject
package:flutter_tools/src/commands/build_apk.dart 592 buildAndroidWithGradle
package:flutter_tools/src/commands/build_apk.dart 603 buildApk
package:flutter_tools/src/android/android_device.dart 291 AndroidDevice.startApp
package:flutter_tools/src/run_hot.dart 165 HotRunner._run
package:flutter_tools/src/run_hot.dart 77 HotRunner.run.<fn>
package:stack_trace Chain.capture
package:flutter_tools/src/run_hot.dart 76 HotRunner.run
package:flutter_tools/src/commands/run.dart 284 RunCommand.runCommand
package:flutter_tools/src/runner/flutter_command.dart 148 FlutterCommand.verifyThenRunCommand
package:flutter_tools/src/commands/run.dart 199 RunCommand.verifyThenRunCommand
package:flutter_tools/src/runner/flutter_command.dart 119 FlutterCommand.run
package:args/command_runner.dart 194 CommandRunner.runCommand
package:flutter_tools/src/runner/flutter_command_runner.dart 224 FlutterCommandRunner.runCommand
package:args/command_runner.dart 109 CommandRunner.run.<fn>
dart:async Future.Future.sync
package:args/command_runner.dart 109 CommandRunner.run
package:flutter_tools/src/runner/flutter_command_runner.dart 151 FlutterCommandRunner.run
package:flutter_tools/executable.dart 128 main.<fn>.<fn>
package:stack_trace Chain.capture
package:flutter_tools/executable.dart 127 main.<fn>
package:flutter_tools/src/base/context.dart 76 AppContext._run
package:flutter_tools/src/base/context.dart 66 AppContext.runInZone.<fn>
dart:async runZoned
package:flutter_tools/src/base/context.dart 65 AppContext.runInZone
package:flutter_tools/executable.dart 98 main
../../packages/flutter_tools/bin/flutter_tools.dart 8 main
===== asynchronous gap ===========================
dart:async _Completer.completeError
package:flutter_tools/src/android/gradle.dart 196 buildGradleProjectV2
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:flutter_tools/src/android/gradle.dart buildGradleProjectV2
package:flutter_tools/src/android/gradle.dart 133 buildGradleProject
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:flutter_tools/src/android/gradle.dart buildGradleProject
package:flutter_tools/src/commands/build_apk.dart 592 buildAndroidWithGradle
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:flutter_tools/src/commands/build_apk.dart buildAndroidWithGradle
package:flutter_tools/src/commands/build_apk.dart 603 buildApk
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:flutter_tools/src/commands/build_apk.dart buildApk
package:flutter_tools/src/android/android_device.dart 291 AndroidDevice.startApp
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:flutter_tools/src/android/android_device.dart AndroidDevice.startApp
package:flutter_tools/src/run_hot.dart 165 HotRunner._run
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:flutter_tools/src/run_hot.dart HotRunner._run
package:flutter_tools/src/run_hot.dart 77 HotRunner.run.<fn>
package:stack_trace Chain.capture
package:flutter_tools/src/run_hot.dart 76 HotRunner.run
package:flutter_tools/src/commands/run.dart 284 RunCommand.runCommand
"><pre class="notranslate"><code class="notranslate">$ flutter run
Launching lib/main.dart on Nexus 6 in debug mode...
Running 'gradle assembleDebug'...
Checking the license for package Android SDK Build-Tools 24.0.1 in /usr/local/google/home/ianh/Android/Sdk/licenses
Warning: License for package Android SDK Build-Tools 24.0.1 not accepted.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 24.0.1].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
> Could not get unknown property 'compileDebugJavaWithJavac' for project ':app' of type org.gradle.api.Project.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Exception from flutter run: Exception: Gradle build failed: 1
package:flutter_tools/src/base/common.dart 29 throwToolExit
package:flutter_tools/src/android/gradle.dart 183 buildGradleProjectV2
package:flutter_tools/src/android/gradle.dart 133 buildGradleProject
package:flutter_tools/src/commands/build_apk.dart 592 buildAndroidWithGradle
package:flutter_tools/src/commands/build_apk.dart 603 buildApk
package:flutter_tools/src/android/android_device.dart 291 AndroidDevice.startApp
package:flutter_tools/src/run_hot.dart 165 HotRunner._run
package:flutter_tools/src/run_hot.dart 77 HotRunner.run.<fn>
package:stack_trace Chain.capture
package:flutter_tools/src/run_hot.dart 76 HotRunner.run
package:flutter_tools/src/commands/run.dart 284 RunCommand.runCommand
package:flutter_tools/src/runner/flutter_command.dart 148 FlutterCommand.verifyThenRunCommand
package:flutter_tools/src/commands/run.dart 199 RunCommand.verifyThenRunCommand
package:flutter_tools/src/runner/flutter_command.dart 119 FlutterCommand.run
package:args/command_runner.dart 194 CommandRunner.runCommand
package:flutter_tools/src/runner/flutter_command_runner.dart 224 FlutterCommandRunner.runCommand
package:args/command_runner.dart 109 CommandRunner.run.<fn>
dart:async Future.Future.sync
package:args/command_runner.dart 109 CommandRunner.run
package:flutter_tools/src/runner/flutter_command_runner.dart 151 FlutterCommandRunner.run
package:flutter_tools/executable.dart 128 main.<fn>.<fn>
package:stack_trace Chain.capture
package:flutter_tools/executable.dart 127 main.<fn>
package:flutter_tools/src/base/context.dart 76 AppContext._run
package:flutter_tools/src/base/context.dart 66 AppContext.runInZone.<fn>
dart:async runZoned
package:flutter_tools/src/base/context.dart 65 AppContext.runInZone
package:flutter_tools/executable.dart 98 main
../../packages/flutter_tools/bin/flutter_tools.dart 8 main
===== asynchronous gap ===========================
dart:async _Completer.completeError
package:flutter_tools/src/android/gradle.dart 196 buildGradleProjectV2
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:flutter_tools/src/android/gradle.dart buildGradleProjectV2
package:flutter_tools/src/android/gradle.dart 133 buildGradleProject
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:flutter_tools/src/android/gradle.dart buildGradleProject
package:flutter_tools/src/commands/build_apk.dart 592 buildAndroidWithGradle
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:flutter_tools/src/commands/build_apk.dart buildAndroidWithGradle
package:flutter_tools/src/commands/build_apk.dart 603 buildApk
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:flutter_tools/src/commands/build_apk.dart buildApk
package:flutter_tools/src/android/android_device.dart 291 AndroidDevice.startApp
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:flutter_tools/src/android/android_device.dart AndroidDevice.startApp
package:flutter_tools/src/run_hot.dart 165 HotRunner._run
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:flutter_tools/src/run_hot.dart HotRunner._run
package:flutter_tools/src/run_hot.dart 77 HotRunner.run.<fn>
package:stack_trace Chain.capture
package:flutter_tools/src/run_hot.dart 76 HotRunner.run
package:flutter_tools/src/commands/run.dart 284 RunCommand.runCommand
</code></pre></div> | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.