text:
springfox-swagger2 version 2.9.2 not compatible with springboot version 2.2.0.M4

Hi,
I am using swagger2 2.9.2, springboot 2.2.0.M4, Hateos 0.25.1.RELEASE. Below is the rumtime error I'm getting:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
springfox.documentation.spring.web.plugins.DocumentationPluginsManager.createContextBuilder(DocumentationPluginsManager.java:152)

"
The following method did not exist:
org.springframework.plugin.core.PluginRegistry.getPluginFor(Ljava/lang/Object;Lorg/springframework/plugin/core/Plugin;)Lorg/springframework/plugin/core/Plugin;

The method's class, org.springframework.plugin.core.PluginRegistry, is available from the following locations:
jar:file:/C:/Users/EKHTJHD/.gradle/caches/modules-2/files-2.1/org.springframework.plugin/spring-plugin-core/2.0.0.M1/189f78af81f23eef12018a4d4cf50b8a6df8ec0d/spring-plugin-core-2.0.0.M1.jar!/org/springframework/plugin/core/PluginRegistry.class

It was loaded from the following location:
file:/C:/Users/EKHTJHD/.gradle/caches/modules-2/files-2.1/org.springframework.plugin/spring-plugin-core/2.0.0.M1/189f78af81f23eef12018a4d4cf50b8a6df8ec0d/spring-plugin-core-2.0.0.M1.jar

Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.plugin.core.PluginRegistry
"
Below is my gradle configuration:
plugins {
id 'org.springframework.boot' version '2.2.0.M4'
//id 'org.springframework.boot' version '2.1.6.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
group = 'com.in28minutes.rest.webservices'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://repo.spring.io/milestone' }
}
dependencies {
//implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
compile group: 'org.springframework.hateoas', name: 'spring-hateoas', version: '0.25.1.RELEASE'
compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2'
//developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
exclude group: 'junit', module: 'junit'
}
}
test {
useJUnitPlatform()
}
If I change springboot version as below then the issue disappears.
id 'org.springframework.boot' version '2.1.6.RELEASE'

Duplicate of #2932

Facing the same issue. When can we expect the delivery time for this fix ?

I'm also facing the same issue and have had no success of fixing it. A proposed solution is to add this dependency:
<dependency>
    <groupId>org.springframework.plugin</groupId>
    <artifactId>spring-plugin-core</artifactId>
    <version>1.2.0.RELEASE</version>
</dependency>

but it doesn't work for me. Swagger 2.9.2 and Spring Boot 2.2.0-RELEASE

I'm also facing the same issue and have had no success of fixing it. A proposed solution is to add this dependency:
<dependency>
    <groupId>org.springframework.plugin</groupId>
    <artifactId>spring-plugin-core</artifactId>
    <version>1.2.0.RELEASE</version>
</dependency>

but it doesn't work for me. Swagger 2.9.2 and Spring Boot 2.2.0-RELEASE

I have the same issue with Spring Boo 2.2.0-RELEASE

Can confirm for version 2.2.1.RELEASE

Yep, I'm facing the same issue for that boot version

Same issue on version 2.2.2.RELEASE

I fixed with above suggestion using spring-plugin-core:1.2.0.RELEASE
compile("org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE") {     force = true   }
and also removed dependencies
org.springframework.boot:spring-boot-starter-data-rest org.springframework.data:spring-data-rest-hal-browser

+1 (2.2.2.RELEASE)

+1 (2.2.2.RELEASE)

Spring boot: 2.2.2
swagger2: 3.0.0-SNAPSHOT
Working for me.
I'm using

jcenter-snapshots
jcenter
http://oss.jfrog.org/artifactory/oss-snapshot-local/

If you are not using RepositoryRestMvc, disable it in your Application:
@SpringBootApplication(exclude = {RepositoryRestMvcAutoConfiguration.class})

@dilipkrish Do you happen to know how complicated fixing this?
As far as I understand 3.x is using spring-plugin-core:2.x right? How hard is backporting it?
I would like to use spring-hateoas and springfox-swagger together but as far as I understand, this is not possible right now.

@jahidakhtargit @dilipkrish Could one of you please rename this issue so that it will reflect that multiple release versions are involved, something like: springfox-swagger 2.x is not compatible with spring-boot 2.2.x

@Splash34 I have the same issue. But i resolved with your solution.

I have the same issue. But i resolved with @LukeHackett  solution.

Springboot 2.2.X does not support SpringFox. Instead I recommend to migrate from springfox to OpenAPI to support Swagger UI. You need to remove all the swagger 2 and springfox dependencies from your project and add the below dependency.

org.springdoc
springdoc-openapi-ui
1.3.4

for more details go to this link:
https://springdoc.org/migrating-from-springfox.htmlou need to update
Addition to this to support springboot 2.2.x you need to update spring core plug in

org.springframework.plugin
spring-plugin-core
2.0.0.RELEASE

Springboot 2.2.X does not support springfox. Instead I recommend to migrate from springfox to OpenAPI to support Swagger UI. You need to remove all the swagger 2 and springfox dependencies from your project and add the below dependency.
<dependency>
      <groupId>org.springdoc</groupId>
      <artifactId>springdoc-openapi-ui</artifactId>
      <version>1.3.4</version>
   </dependency>

for more details go to this link:
https://springdoc.org/migrating-from-springfox.html
Addition to this to support springboot 2.2.x you need to update springcore plugin
<dependency>
  <groupId>org.springframework.plugin</groupId>
  <artifactId>spring-plugin-core</artifactId>
  <version>2.0.0.RELEASE</version>
</dependency>

Am currently testing with the latest Spring-boot version 2.2.6 and this issue is persisting with Swagger 2.9.2 version. This is bit annoying as it always blocks your development flow and you end up putting in efforts to troubleshoot which go un-productive.  I see lot of developers posting similar problems, so it would be best if we can find the resolution on the versions soon or any work-around which can be taken into production projects. Thanks.
Happy Coding !!

I can confirm that this is also happening with Spring Boot 2.2.6 and Swagger 2.9.2. For me, everything is working just as it should. I started having this issue the moment I added this dependency to my pom.xml file:
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>

If I remove this dependency, the app starts up fine again.

I got it working with the following setup:
#pom.xml
      <parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.2.RELEASE</version>
		<relativePath />
       </parent>

         <dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-rest</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>

		<!-- io.springfox setup  -->
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger-ui</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
                <dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger2</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-data-rest</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
	</dependencies>

       <repositories>
		<repository>
			<id>jcenter-snapshots</id>
			<name>jcenter</name>
			<url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
		</repository>
	</repositories>

#SpringFoxConfig.java
@Configuration
@EnableSwagger2WebMvc
@Import(SpringDataRestConfiguration.class)
public class SpringFoxConfig {
	@Bean
	public Docket api() {
		return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any())
				.paths(PathSelectors.any()).build();
	}
}

#URL:
http://localhost:8080/swagger-ui.html#/
I know it's just a snapshot version at the moment, but for my purpose it's totally fine for now.
Nevertheless, they have to release a new major version.

This resolved my issue. Thanks.

Thanks, resolved!

I got it working with the following setup:
#pom.xml
      <parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.2.RELEASE</version>
		<relativePath />
       </parent>

         <dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-rest</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>

		<!-- io.springfox setup  -->
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger-ui</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
                <dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger2</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-data-rest</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
	</dependencies>

       <repositories>
		<repository>
			<id>jcenter-snapshots</id>
			<name>jcenter</name>
			<url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
		</repository>
	</repositories>

#SpringFoxConfig.java
@Configuration
@EnableSwagger2WebMvc
@Import(SpringDataRestConfiguration.class)
public class SpringFoxConfig {
	@Bean
	public Docket api() {
		return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any())
				.paths(PathSelectors.any()).build();
	}
}

#URL:
http://localhost:8080/swagger-ui.html#/
I know it's just a snapshot version at the moment, but for my purpose it's totally fine for now.
Nevertheless, they have to release a new major version.

This resolved my issue. Thanks.

Thanks, resolved!

org.springframework.boot:spring-boot-starter-data-rest

Yes, it seems it's the org.springframework.boot:spring-boot-starter-data-rest to be the issue, as soon as I remove it, everything works.

I got it working with the following setup:
#pom.xml
      <parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.2.RELEASE</version>
		<relativePath />
       </parent>

         <dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-rest</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>

		<!-- io.springfox setup  -->
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger-ui</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
                <dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger2</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-data-rest</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
	</dependencies>

       <repositories>
		<repository>
			<id>jcenter-snapshots</id>
			<name>jcenter</name>
			<url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
		</repository>
	</repositories>

#SpringFoxConfig.java
@Configuration
@EnableSwagger2WebMvc
@Import(SpringDataRestConfiguration.class)
public class SpringFoxConfig {
	@Bean
	public Docket api() {
		return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any())
				.paths(PathSelectors.any()).build();
	}
}

#URL:
http://localhost:8080/swagger-ui.html#/
I know it's just a snapshot version at the moment, but for my purpose it's totally fine for now.
Nevertheless, they have to release a new major version.

It works for me with spring-boot-starter-parent 2.2.6.RELEASE. Thanks!

I got it working with the following setup:
#pom.xml
      <parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.2.RELEASE</version>
		<relativePath />
       </parent>

         <dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-rest</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>

		<!-- io.springfox setup  -->
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger-ui</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
                <dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger2</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-data-rest</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
	</dependencies>

       <repositories>
		<repository>
			<id>jcenter-snapshots</id>
			<name>jcenter</name>
			<url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
		</repository>
	</repositories>

#SpringFoxConfig.java
@Configuration
@EnableSwagger2WebMvc
@Import(SpringDataRestConfiguration.class)
public class SpringFoxConfig {
	@Bean
	public Docket api() {
		return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any())
				.paths(PathSelectors.any()).build();
	}
}

#URL:
http://localhost:8080/swagger-ui.html#/
I know it's just a snapshot version at the moment, but for my purpose it's totally fine for now.
Nevertheless, they have to release a new major version.

It works for me with spring-boot-starter-parent 2.2.6.RELEASE. Thanks!

Update: It seems comflict with my neo4j http driver (I am using old neo4j version 2.2.3).  I get warnings  like "
o.s.d.n.mapping.neo4jpersistentproperty : owning classinfo is null for property". After remove the swagger from pom.xml, the neo4j http driver works.

I'm using Spring Boot 2.3.0, and try to use HATEOAS and Swagger 2 as many of you here, with similar problems of compatibility between them. I already tried every suggestion from here without luck.
I found this post that works for me, considering I'm using Gradle
https://dev.to/otaviotarelhodb/how-to-use-springfox-2-9-2-with-spring-hateoas-2-on-gradle-project-6mn
Actually works for me with HATEOAS and SWAGGER with the latest Spring Boot version by now.

I'm using Spring Boot 2.3.0, and try to use HATEOAS and Swagger 2 as many of you here, with similar problems of compatibility between them. I already tried every suggestion from here without luck.
I found this post that works for me, considering I'm using Gradle
https://dev.to/otaviotarelhodb/how-to-use-springfox-2-9-2-with-spring-hateoas-2-on-gradle-project-6mn
Actually works for me with HATEOAS and SWAGGER with the latest Spring Boot version by now.

Thanks! It works for me :)

I got it working with the following setup:
#pom.xml
      <parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.2.RELEASE</version>
		<relativePath />
       </parent>

         <dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-rest</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>

		<!-- io.springfox setup  -->
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger-ui</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
                <dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger2</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-data-rest</artifactId>
			<version>3.0.0-SNAPSHOT</version>
		</dependency>
	</dependencies>

       <repositories>
		<repository>
			<id>jcenter-snapshots</id>
			<name>jcenter</name>
			<url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
		</repository>
	</repositories>

#SpringFoxConfig.java
@Configuration
@EnableSwagger2WebMvc
@Import(SpringDataRestConfiguration.class)
public class SpringFoxConfig {
	@Bean
	public Docket api() {
		return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any())
				.paths(PathSelectors.any()).build();
	}
}

#URL:
http://localhost:8080/swagger-ui.html#/
I know it's just a snapshot version at the moment, but for my purpose it's totally fine for now.
Nevertheless, they have to release a new major version.

Works fine. Thanks

Change the version of Springfox of 2.9.2 for LATEST, like this:
<!--for Swagger Endpoints support-->
<dependency>
   <groupId>io.springfox</groupId>
   <artifactId>springfox-swagger2</artifactId>
   <version>LATEST</version>
</dependency>

<!--for Swagger UI support-->
<dependency>
   <groupId>io.springfox</groupId>
   <artifactId>springfox-swagger-ui</artifactId>
   <version>LATEST</version>
</dependency>

it's working for me

@fornazieri its meant to be as much compatible with previous versions as possible but 3.0.0 is zero config. You can just drop in the springfox-boot-starter dependency and remove any manual dependencies you've added. Also no longer need the @Enable... annotations, if you're using spring boot.

yeahh, i changed my version for 3.0.0 and removed the @EnableSwagger2 annotation, now it's working perfectly, thanksss @dilipkrish

That's an issue for SB 2.1- in springfox 3.0.0 too. Since we are still on SB 2.0.x and can't upgrade SB just yet ended up with redefining custom beans like this:
@Primary
@Component("documentationPluginsManager")
public class CustomDocumentationPluginsManager extends DocumentationPluginsManager {
    @Autowired
    @Qualifier("modelNamesRegistryFactoryPluginRegistry")
    private PluginRegistry<ModelNamesRegistryFactoryPlugin, DocumentationType> modelNameRegistryFactoryPlugins;

    @Override
    public ModelNamesRegistryFactoryPlugin modelNamesGeneratorFactory(DocumentationType documentationType) {
        return Optional.ofNullable(modelNameRegistryFactoryPlugins.getPluginFor(
            documentationType)).orElseGet(DefaultModelNamesRegistryFactory::new);
    }
}

Basically polyfilling the failing methods with calls to available methods in PluginRegistry in spring-plugin-core:1.2.0.RELEASE. Had to override 3 beans - DocumentationPluginsManager, SchemaPluginsManager, TypeNameExtractor - and 1 class BodyParameterSpecificationProvider with preserving its fully qualified package springfox.documentation.builders since it's not a Spring bean.

Man, I solved my problem with only this dependency

org.springdoc
springdoc-openapi-ui
1.5.1

I started to see this issue after upgrading Sentry to v3, I can't see how it's related but 2.9.2 used to work with  the dependency spring-plugin-core-1.x.
Upgrading to spring-plugin-core-2.0.0 did not solve it.
I've upgraded to springfox 3.0.0 following the docs.
application.properties

    implementation 'io.springfox:springfox-boot-starter:3.0.0'
    implementation 'io.springfox:springfox-swagger-ui:3.0.0'

and removed the @Enable... from SwaggerConfig.
I'm now getting another err. and it does not work at all.
09:12:36.547 [restartedMain] ERROR s.d.s.w.p.DocumentationPluginsBootstrapper - Unable to scan documentation context default
java.lang.IllegalStateException: Model already registered with different name.
	at springfox.documentation.schema.TypeNameIndexingAdapter.checkTypeRegistration(TypeNameIndexingAdapter.java:55)
	at springfox.documentation.schema.TypeNameIndexingAdapter.registerUniqueType(TypeNameIndexingAdapter.java:82)

tried using this
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.13.RELEASE")
implementation 'io.springfox:springfox-boot-starter:3.0.0'
Still getting same error

Still getting the same error with 2.4.5 version.Anyone resolved it please reply.

Same error, latest version

None of the above fixed the issue for me, but, I've managed to get the 3.0.0-SNAPSHOT version of the springfox library to work, with the following changes to my pom.xml.
Although, going forward, I'm probably look to other libraries to provide swagger such as Spring doc
<dependency>
  <groupId>io.springfox</groupId>
  <artifactId>springfox-swagger2</artifactId>
  <version>3.0.0-SNAPSHOT</version>
  <exclusions>
    <exclusion>
      <groupId>org.springframework.plugin</groupId>
      <artifactId>spring-plugin-core</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>io.springfox</groupId>
  <artifactId>springfox-swagger-ui</artifactId>
  <version>3.0.0-SNAPSHOT</version>
</dependency>
<dependency>
  <groupId>io.springfox</groupId>
  <artifactId>springfox-spring-webflux</artifactId>
  <version>3.0.0-SNAPSHOT</version>
  <exclusions>
    <exclusion>
      <groupId>org.springframework.plugin</groupId>
      <artifactId>spring-plugin-core</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.springframework.plugin</groupId>
  <artifactId>spring-plugin-core</artifactId>
  <version>2.0.0.RELEASE</version>
</dependency>

THANK YOU

authors: Code88Hary CodeAndChoke EvgeniGordeev JYOTIRANJANj Kakau-preto M-Thirumal RaveKev Splash34 WJie12 alexiz10 awesomeankur bagraercan chavesrodolfo dennisdaotvlk dilipkrish egch fornazieri ghostAmaru hendisantika iVieL jahidakhtargit jenni jonatan-ivanov marcusvoltolim mimkorn nurkan2313 pawanmundhra shirisha-96 sntour suerain thiagohmoreira ticoaraujo tk-png xavierKress

repo: springfox/springfox


text:
Revert "Create LICENSE"

Reverts sprshr/parcel-locker#4

close #5

source: gharchive/pull-request

repo: sprshr/parcel-locker

license: MIT

license_type: permissive

license_source: github-api


text:
Export SIWE

Description
This PR exports the SiweMessage class from siwe as part of ssx and ssx-server. This is done as these packages can be used together commonly and was done to reduce dependencies
Type

[x] New feature (non-breaking change which adds functionality)

Diligence Checklist

[x] I have performed a self-review of my code
[x] My changes generate no new warnings

Codecov Report
Base: 72.75% // Head: 72.77% // Increases project coverage by +0.02% :tada:

Coverage data is based on head (248666f) compared to base (745e1dd).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
+ Coverage   72.75%   72.77%   +0.02%
==========================================
  Files          22       22
  Lines        2679     2681       +2
  Branches      173      173
==========================================
+ Hits         1949     1951       +2
  Misses        730      730

Impacted Files
Coverage Δ

packages/ssx-sdk/src/index.ts
100.00% <100.00%> (ø)

packages/ssx-server/src/index.ts
100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

authors: codecov-commenter skgbafa

repo: spruceid/ssx


text:
BUG-1: Fixed the bug to make the table look pretty.

Fixed the bug that I was asked to fix.

Since you're already working on this code, please capitalize the second "t" in the Time tracking column heading.

authors: a-aaronson sam-surname

repo: sprydevs/kanboard


text:
dicttoxml is GPLv2-licensed

I see in this patch the dicttoxml library was added as a requirement, which is GPLv2-licensed.  Unfortunately the GPLv2 is not compatible with the Apache2.0 license, which moto is licensed under, and as far as I understand it, this would require moto to switch to a GPLv2-based licensing scheme.  (The difference between GPLv2 and LGPLv2 is that LGPL allows you to link libraries in to non-GPL-licensed code, whereas GPL considers even linking of libraries to create a "derivative work").  Any chance we could get a version of moto that doesn't depend on GPLv2-licensed code?

Also I noticed that dicttoxml is only used in one place so it seems like it might not be that hard to replace it with something else.

@drmorr0 Great find, thank you for this. Yes, we can remove this dependency immediately and provide you with a new version of Moto without a problematic license.

Fantastic, thank you.  We've been using an ancient version of moto that didn't have this dependency and I was hoping to upgrade to a more recent version -- it's really useful software.  Let me know if there's any way I can help with the change.

@drmorr0 once #1231 is merged I'll release a new version for you. Please give that a review if you have a moment.

@drmorr0 Moto version 1.1.21 is now released and does not depend on dicttoxml

Nice!  Thank you so much!

source: gharchive/issue

repo: spulec/moto

license_source: bigquery


text:
instance descriptions should include toplevel Public{IpAddress,DnsName}

AWS/boto3 .describe_instances calls return instances with top level PublicDnsName and PublicIpAddress keys for instances with public or elastic IPs. moto currently returns this information only nested inside the NetworkInterfaces dict.

I believe that this is relevant to the failing test case given here: https://github.com/spulec/moto/pull/730


text:
ContainerInstance deregistration

Features

Implemented deregister_container_instance - tests added for behaviour around exception raising etc.

Changes

Changed ContainerInstance object attributes to use snake case for consistency
Added myself to the authors list

Coverage decreased (-0.07%) to 93.466% when pulling f3aff0f356196f29c3b7598499bf452fcd05e650 on gjtempleton:TaskDraining into 30b1de507cb08794edade449505fbddd0a8a043b on spulec:master.

Coverage decreased (-0.2%) to 93.342% when pulling 69b86b2c7a25b225fc9da2f76f6dbb9f5adfee23 on gjtempleton:TaskDraining into 30b1de507cb08794edade449505fbddd0a8a043b on spulec:master.

Hey, this looks great.
It seems to be breaking on Python 3. If you can get that fixed, I'll be happy to merge.

Coverage increased (+0.2%) to 93.724% when pulling 3cbeb551604aba658eb4993bce81dee97b7dc138 on gjtempleton:TaskDraining into 30b1de507cb08794edade449505fbddd0a8a043b on spulec:master.

Serves me right for testing locally using 3.5 rather than 3.6. All good now.

Coverage increased (+0.005%) to 93.724% when pulling 47bc23f4810051a7b6670f276ed5229fd00baa6a on gjtempleton:TaskDraining into 34c711189f4961eeee6a5de32e8106ec0bdb48bf on spulec:master.

Looks great, thank you!

authors: coveralls gjtempleton spulec


text:
remote ssh kernel connection

Description
What steps will reproduce the problem?

tried to connect to posgres database and it encountered a problem with sqlalchemy
Traceback
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'
Traceback (most recent call last):
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 437, in data
    return to_qvariant(self.get_bgcolor(index))
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\msqm\AppData\Local\Programs\Python\Python311\Lib\site-packages\spyder\widgets\collectionseditor.py", line 524, in get_bgcolor
    python_type = value['python_type']
                  ~~~~~^^^^^^^^^^^^^^^
KeyError: 'python_type'

Versions

Spyder version: 5.5.1  (pip)
Python version: 3.11.7 64-bit
Qt version: 5.15.2
PyQt5 version: 5.15.10
Operating System: Windows-10-10.0.19045-SP0

Dependencies
# Mandatory:
atomicwrites >=1.2.0             :  1.4.1 (OK)
chardet >=2.0.0                  :  5.2.0 (OK)
cloudpickle >=0.5.0              :  3.0.0 (OK)
cookiecutter >=1.6.0             :  2.6.0 (OK)
diff_match_patch >=20181111      :  20230430 (OK)
intervaltree >=3.0.2             :  3.1.0 (OK)
IPython >=8.13.0,<9.0.0,!=8.17.1 :  8.22.2 (OK)
jedi >=0.17.2,<0.20.0            :  0.19.1 (OK)
jellyfish >=0.7                  :  1.0.3 (OK)
jsonschema >=3.2.0               :  4.21.1 (OK)
keyring >=17.0.0                 :  24.3.1 (OK)
nbconvert >=4.0                  :  7.16.2 (OK)
numpydoc >=0.6.0                 :  1.6.0 (OK)
paramiko >=2.4.0                 :  3.4.0 (OK)
parso >=0.7.0,<0.9.0             :  0.8.3 (OK)
pexpect >=4.4.0                  :  4.9.0 (OK)
pickleshare >=0.4                :  0.7.5 (OK)
psutil >=5.3                     :  5.9.8 (OK)
pygments >=2.0                   :  2.17.2 (OK)
pylint >=2.5.0,<3.1              :  3.0.4 (OK)
pylint_venv >=3.0.2              :  3.0.3 (OK)
pyls_spyder >=0.4.0              :  0.4.0 (OK)
pylsp >=1.10.0,<1.11.0           :  1.10.0 (OK)
pylsp_black >=2.0.0,<3.0.0       :  2.0.0 (OK)
qdarkstyle >=3.2.0,<3.3.0        :  3.2.3 (OK)
qstylizer >=0.2.2                :  0.2.2 (OK)
qtawesome >=1.2.1                :  1.3.0 (OK)
qtconsole >=5.5.1,<5.6.0         :  5.5.1 (OK)
qtpy >=2.1.0                     :  2.4.1 (OK)
rtree >=0.9.7                    :  1.2.0 (OK)
setuptools >=49.6.0              :  65.5.0 (OK)
sphinx >=0.6.6                   :  7.2.6 (OK)
spyder_kernels >=2.5.0,<2.6.0    :  2.5.1 (OK)
textdistance >=4.2.0             :  4.6.1 (OK)
three_merge >=0.1.1              :  0.1.1 (OK)
watchdog >=0.10.3                :  4.0.0 (OK)
zmq >=22.1.0                     :  25.1.2 (OK)

# Optional:
cython >=0.21                    :  None (NOK)
matplotlib >=3.0.0               :  3.8.3 (OK)
numpy >=1.7                      :  1.26.4 (OK)
pandas >=1.1.1                   :  2.2.1 (OK)
scipy >=0.17.0                   :  1.12.0 (OK)
sympy >=0.7.3                    :  None (NOK)

Hey @mikesmith5446, thanks for reporting. It seems there's a mismatch between your Spyder and remote Spyder-kernels version. Please be sure of having at least version 2.5.0 of Spyder-kernels before trying to connect to it.

Ok thanks, I will try that
Best regards,
Mike A. Smith
Senior Digital Development Specialist
Novonesis
PO BOX 576
77 Perrys Chapel Church Road
Franklinton NC 27525 USA
Phone: +1 9194941706
Mobile: +1 9196185811
E-mail: @.@.>
Teams: @.@.>
Find Novonesis on: Webhttps://www.novonesis.com/ | LinkedInhttps://www.linkedin.com/company/novonesis | Xhttps://twitter.com/novonesis | Facebookhttps://www.facebook.com/novonesisbio | Instagramhttps://www.instagram.com/novonesis/
Novozymes North America, Inc. (reg. no.: 13-2639630). Registered address: CT Corporation System, 111 8th Avenue, New York, NY 10011, United States of America, part of Novonesis Group.
This e-mail (including any attachments) is for the intended addressee(s) only and may contain confidential and/or proprietary information protected by law. You are hereby notified that any unauthorized reading, disclosure, copying or distribution of this e-mail or use of information herein is strictly prohibited. If you are not an intended recipient, you should delete this e-mail immediately. Thank you.
Your personal data will be processed in accordance with our privacy policyhttps://www.novonesis.com/en/privacy-policy.
From: Carlos Cordoba @.>
Sent: Wednesday, March 27, 2024 12:19 PM
To: spyder-ide/spyder @.>
Cc: Mike A. Smith @.>; Mention @.>
Subject: Re: [spyder-ide/spyder] remote ssh kernel connection (Issue #21923)
Hey @mikesmith5446https://github.com/mikesmith5446, thanks for reporting. It seems there's a mismatch between your Spyder and remote Spyder-kernels version. Please be sure of having at least version 2.5.0 of Spyder-kernels before trying to connect to it.

Reply to this email directly, view it on GitHubhttps://github.com/spyder-ide/spyder/issues/21923#issuecomment-2023177258, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANI6W4PBMXX7EURA5KI4KJTY2LWNZAVCNFSM6AAAAABFESXETOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRTGE3TOMRVHA.
You are receiving this because you were mentioned.Message ID: @.@.>>

Closing due to lack of response. Hopefully, you managed to fix this problem.

repo: spyder-ide/spyder


text:
The text "Run code" does not fit in the button (partially visible) at the Step №3 "IPython Console" of Introduction tour

Issue Report Checklist

[x] Searched the issues page for similar reports
[x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[x] Could not reproduce inside jupyter qtconsole (if console-related)
[x] Tried basic troubleshooting (if a bug/error)

[x] Restarted Spyder
[x] Reset preferences with spyder --reset
[x] Reinstalled the latest version of Anaconda
[x] Tried the other applicable steps from the Troubleshooting Guide

[x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
The text "Run code" does not fit in the button (partially visible) at the Step №3 "IPython Console" of Introduction tour (Help --> Show tour).
After button was clicked the text become is fully visible.
What steps reproduce the problem?

After installation and the first launch of the program there is a modal window with Introduction tour
Go to Step №3 of Introduction tour

OR

Run the program
Choose Help --> Show tour
Go to Step №3 of Introduction tour

What is the expected output? What do you see instead?
Expected Result: the text of the button Run code fits within the button

Actual Result: the text does not fit in the button

Versions

Spyder version: 5.5.1
Python version: 3.12.3
Qt version: 5.15.13
PyQt version: 5.15.10
Operating System name/version: Kubuntu 24.04.1 LTS x86_64

Dependencies
# Mandatory:
atomicwrites >=1.2.0             :  1.4.1 (OK)
chardet >=2.0.0                  :  5.2.0 (OK)
cloudpickle >=0.5.0              :  3.0.0 (OK)
cookiecutter >=1.6.0             :  2.6.0 (OK)
diff_match_patch >=20181111      :  20230430 (OK)
intervaltree >=3.0.2             :  3.0.2 (OK)
IPython >=8.13.0,<9.0.0,!=8.17.1 :  8.20.0 (OK)
jedi >=0.17.2,<0.20.0            :  0.19.1 (OK)
jellyfish >=0.7                  :  0.10.0 (OK)
jsonschema >=3.2.0               :  4.10.3 (OK)
keyring >=17.0.0                 :  24.3.1 (OK)
nbconvert >=4.0                  :  6.5.3 (OK)
numpydoc >=0.6.0                 :  1.6.0 (OK)
parso >=0.7.0,<0.9.0             :  0.8.3 (OK)
pexpect >=4.4.0                  :  4.9.0 (OK)
pickleshare >=0.4                :  0.7.5 (OK)
psutil >=5.3                     :  5.9.8 (OK)
pygments >=2.0                   :  2.17.2 (OK)
pylint >=2.5.0,<3.1              :  3.0.3 (OK)
pylint_venv >=3.0.2              :  3.0.2 (OK)
pyls_spyder >=0.4.0              :  0.4.0 (OK)
pylsp >=1.10.0,<1.11.0           :  1.10.0 (OK)
pylsp_black >=2.0.0,<3.0.0       :  2.0.0 (OK)
qdarkstyle >=3.2.0,<3.3.0        :  3.2.3 (OK)
qstylizer >=0.2.2                :  0.2.2 (OK)
qtawesome >=1.2.1                :  1.2.3 (OK)
qtconsole >=5.5.1,<5.6.0         :  5.5.1 (OK)
qtpy >=2.1.0                     :  2.4.1 (OK)
rtree >=0.9.7                    :  1.2.0 (OK)
setuptools >=49.6.0              :  68.1.2 (OK)
sphinx >=0.6.6                   :  7.2.6 (OK)
spyder_kernels >=2.5.0,<2.6.0    :  2.5.0 (OK)
textdistance >=4.2.0             :  4.6.0 (OK)
three_merge >=0.1.1              :  0.1.1 (OK)
watchdog >=0.10.3                :  3.0.0 (OK)
xdg >=0.26                       :  0.28 (OK)
zmq >=22.1.0                     :  24.0.1 (OK)

# Optional:
cython >=0.21                    :  None (NOK)
matplotlib >=3.0.0               :  3.6.3 (OK)
numpy >=1.7                      :  1.26.4 (OK)
pandas >=1.1.1                   :  None (NOK)
scipy >=0.17.0                   :  1.11.4 (OK)
sympy >=0.7.3                    :  1.12 (OK)

Hi @0bs01ete thank you for the report! I was unable to reproduce this (however I used Windows and Spyder 6.0.2 installed from our installers to check):

Could it be possible for you to check if this is still happening with the latest release (Spyder 6.0.2)? You could do the check installing our Linux installer available over the Spyder GitHub release page: https://github.com/spyder-ide/spyder/releases/latest
Let us know if using a more recent Spyder version helps!

Closing due to lack of response


text:
RuntimeError when closing spyder

Description of your problem
When I open spyder from the command line and then quit, the following error is displayed in the terminal:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 2117, in hideEvent
    if plugin.isAncestorOf(self.last_focused_widget):
RuntimeError: wrapped C/C++ object of type QPushButton has been deleted

It happens only when the 'prompt when existing' option is selected, so I guess the error is related to the confirmation dialog.
Versions and main components

Spyder Version: 3.1.4
Python Version: 3.6.1
Qt Version: 5.9.1
PyQt Version: PyQt5 5.9
Operating system: Archlinux

Dependencies
jedi >=0.9.0     :  0.10.2 (OK)
matplotlib >=1.0 :  2.0.2 (OK)
nbconvert >=4.0  :  4.3.0 (OK)
numpy >=1.7      :  1.13.1 (OK)
pandas >=0.13.1  :  0.20.1 (OK)
psutil >=0.3     :  5.2.1 (OK)
pycodestyle >=0.6:  2.3.1 (OK)
pyflakes >=0.6.0 :  1.5.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
pylint >=0.25    :  1.7.2 (OK)
qtconsole >=4.2.0:  4.3.0 (OK)
rope >=0.9.4     :  0.10.5 (OK)
sphinx >=0.6.6   :  1.6.3 (OK)
sympy >=0.7.3    :  1.1 (OK)

Thanks for reporting. We'll fix this error in Spyder 3.2.


text:
Error while starting spyder through anaconda navigator

Description
What steps will reproduce the problem?

Starting spyder

What is the expected output? What do you see instead?
Expected output: Spyder should start
What Happens: It throws an error
Please provide any additional information below
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/spyder/plugins/init.py", line 511, in
toggled=lambda checked: self.toggle_view(checked),
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/spyder/plugins/ipythonconsole.py", line 725, in toggle_view
self.create_new_client(give_focus=False)
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/spyder/plugins/ipythonconsole.py", line 1033, in create_new_client
self.connect_client_to_kernel(client)
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/spyder/plugins/ipythonconsole.py", line 1059, in connect_client_to_kernel
stderr_file)
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/spyder/plugins/ipythonconsole.py", line 1477, in create_kernel_manager_and_kernel_client
config=None, autorestart=True)
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 958, in new
inst.setup_instance(*args, **kwargs)
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 986, in setup_instance
super(HasTraits, self).setup_instance(*args, **kwargs)
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 977, in setup_instance
value.instance_init(self)
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 1691, in instance_init
self._resolve_classes()
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 1696, in _resolve_classes
self.klass = self._resolve_string(self.klass)
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 1507, in _resolve_string
return import_item(string)
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/traitlets/utils/importstring.py", line 34, in import_item
module = import(package, fromlist=[obj])
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/jupyter_client/session.py", line 61, in
from jupyter_client.jsonutil import extract_dates, squash_dates, date_default
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/jupyter_client/jsonutil.py", line 11, in
from dateutil.parser import parse as _dateutil_parse
File "/home/ankk98/anaconda3/lib/python3.6/site-packages/dateutil/parser.py", line 158
l.append("%s=%s" % (attr, value))
^
SyntaxError: invalid syntax
Version and main components

Spyder Version: 3.2.6
Python Version: 3.6.4
Qt Versions: 5.6.2, PyQt5 5.6 on Linux

Dependencies
pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  None (NOK)
numpy >=1.7      :  1.14.0 (OK)
sphinx >=0.6.6   :  1.6.6 (OK)
rope >=0.9.4     :  0.10.7 (OK)
jedi >=0.9.0     :  0.11.1 (OK)
psutil >=0.3     :  5.4.3 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0.7.3    :  1.1.1 (OK)
cython >=0.21    :  0.27.3 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  6.2.1 (OK)
pylint >=0.25    :  1.8.2 (OK)

Reinstalling Anaconda fixed the issue. :)

Thanks for letting us know about it!


text:
An error ocurred while starting the kernel

Description
What steps will reproduce the problem?
Traceback (most recent call last):
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\spyder_kernels\console\__main__.py", line 11, in
start.main()
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\spyder_kernels\console\start.py", line 284, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\ipykernel\kernelapp.py", line 474, in initialize
self.init_io()
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\ipykernel\kernelapp.py", line 326, in init_io
sys.stdout.flush()
AttributeError: 'NoneType' object has no attribute 'flush'
Traceback (most recent call last):
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\spyder_kernels\console\__main__.py", line 11, in
start.main()
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\spyder_kernels\console\start.py", line 284, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\ipykernel\kernelapp.py", line 474, in initialize
self.init_io()
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\ipykernel\kernelapp.py", line 326, in init_io
sys.stdout.flush()
AttributeError: 'NoneType' object has no attribute 'flush'
Traceback (most recent call last):
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\spyder_kernels\console\__main__.py", line 11, in
start.main()
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\spyder_kernels\console\start.py", line 284, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\ipykernel\kernelapp.py", line 474, in initialize
self.init_io()
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\ipykernel\kernelapp.py", line 326, in init_io
sys.stdout.flush()
AttributeError: 'NoneType' object has no attribute 'flush'
Traceback (most recent call last):
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\spyder_kernels\console\__main__.py", line 11, in
start.main()
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\spyder_kernels\console\start.py", line 284, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\ipykernel\kernelapp.py", line 474, in initialize
self.init_io()
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\ipykernel\kernelapp.py", line 326, in init_io
sys.stdout.flush()
AttributeError: 'NoneType' object has no attribute 'flush'
Traceback (most recent call last):
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\spyder_kernels\console\__main__.py", line 11, in
start.main()
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\spyder_kernels\console\start.py", line 284, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\ipykernel\kernelapp.py", line 474, in initialize
self.init_io()
File "C:\Users\wufangzhao\AppData\Local\Programs\Python\Python36󈛄\lib\site‑packages\ipykernel\kernelapp.py", line 326, in init_io
sys.stdout.flush()
AttributeError: 'NoneType' object has no attribute 'flush'

Versions

Spyder version: 4.0.0.dev0 7e4c213
Python version: 3.6.6
Qt version: 5.9.3
PyQt5 version: 5.9.2
Operating System: Windows 10

Dependencies
pygments >=2.0    :  2.2.0 (OK)
sphinx >=0.6.6    :  1.7.8 (OK)
pyls >=0.19.0     :  0.21.0 (OK)
nbconvert >=4.0   :  5.3.1 (OK)
pandas >=0.13.1   :  None (NOK)
numpy >=1.7       :  None (NOK)
sympy >=0.7.3     :  None (NOK)
cython >=0.21     :  None (NOK)
qtconsole >=4.2.0 :  4.4.1 (OK)
IPython >=4.0     :  6.5.0 (OK)
matplotlib >=2.0.0:  None (NOK)
pylint >=0.25     :  2.1.1 (OK)

This is fixed by running in a system terminal (cmd.exe)
pip install ipykernel==4.8.2


text:
PR: Change variable explorer title for NumPy object arrays

Description of Changes

[x] Wrote at least one-line docstrings (for any new functions)
[x] Added unit test(s) covering the changes (if testable)

[x] Included a screenshot or animation (if affecting the UI, see Licecap)

Change the title for NumPy arrays in the variable explorer

Issue(s) Resolved

Fixes #11331
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: Steff456

Please post an image

@steff456, please make your branch to derive from our 4.x branch (instead of master), with the following commands:
git checkout 4.x
git checkout fix-11331
git rebase --onto 4.x master fix-11331
git push -f origin fix-11331


text:
PR: Limit the number of flags in the editor

Description of Changes
If there are too many flags in the document, the flags will slow down the printing. This disables the flags of a type if there are more than 10000.
To reproduce, create a file with:
with open("test.py", "w") as f:
    for i in range(10000):
        f.write("aaaaaa\n")

This will create 10000 error flags, which will slow down spyder significantly

[ ] Wrote at least one-line docstrings (for any new functions)
[ ] Added unit test(s) covering the changes (if testable)

[ ] Included a screenshot or animation (if affecting the UI, see Licecap)

Issue(s) Resolved

Fixes #
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct:

@impact27, one thing I forgot to mention: could you add a test for this? Just to check that we're not trying to display more than MAX_FLAGS in the scrollflag area.

I am not sure how to do that. the paint code does a bunch of "painter.drawRect" but I think the result is just an image. I wouldn't know how to check how many rectangles are drawn.

What if you check the length of self._dict_flag_list[flag_type] for a certain flag type that goes over MAX_FLAGS in a file?

The filtering is applied at the print stage, so the dictionary would contain more than the limit of elements

Ok, no problem then. Creating a test for this is way harder than I thought.


text:
Fiscal Week

Using the latest default PBIX file without modifications, creating a table visual that shows 'Fiscal Week Year', 'FW Year', FW StartOfWeek', and 'FW EndOfWeek', it appears that the values are duplicated for Fiscal Week Year values "FW53-2021" and "FW01-2022".  Is that expected behavior?

If I also add the 'Date' field, I can see the following, where 1/1/2022 is the only date in "FW01-2022" but its 'FW StartOfWeek' value is not valid.

In my case, the report requester is looking for FW53-2021 to look as it does, but for FW01-2022 to start on 2022-01-02 instead of 2022-01-01 as it does above.  Do I need to tweak settings to achieve that, or does the above situation reflect a potential bug?
A sample PBIX showing this issue is attached.
DAX Date Template - Fiscal Week Issue.zip

Thanks for reporting the issue.
There is certainly a problem, and the worst news is that also Bravo for Power BI has an issue, generating another wrong result for the ISO calendar. I will try to fix the template in Bravo first, then if I have time I'll backport the changes on this template, even though I think we'll deprecate this template because Bravo provides much more flexibility.
However, I'll keep you posted.

Thanks for your help!  Using the latest version of Bravo does seem to give us what we're looking for now.
The 53 weeks piece was probably not an accurate requirement.

Thanks - I'll check whether I can fix the calculation in the DateTemplate, but it's not a high priority now.

I finally realized that in your report you mixed a Fiscal Week column (which is not FW prefixed) with other columns that are FW prefixed. This explains the inconsistency. I can close the issue.

authors: jasonhendrix marcosqlbi

repo: sql-bi/DaxDateTemplate


text:
Sporadic SyntaxException w/ Python3.11

We use mako for rendering CICD Pipeline Definitions (YAML files). It is a rather complex template w/ a lot of Mako-Function-Definitions and nesting + multithreading. The resulting documents vary in size (depending on input-parameters), and are typically between ~300 kiB and ~1.2 MiB.
The template was used w/ Python-versions 3.6 .. 3.10. When upgrading to 3.11, we saw (and still see) sporadic SyntaxExceptions, which roughly occur in about 5% of the time (w/ unchanged template-parameters, of course!). I started working on a minimalised reproducer. If instantiating the same template w/ same parameters 64 times using 2 threads, I almost always see at least one exception stacktrace. The incriminated lines vary, whereas the Mako-part of the stacktrace seems to be always the same.
The error does not seem to occur when limiting concurrency to just one thread. Thus, I suspect a race-condition, probably within Mako's codebase.
The error occurs for latest versions of python3 alpine (3.11.3-r11) when running inside a virtualisation container, and archlinux (3.11.3-1) when running natively.
Example Stacktrace
Traceback (most recent call last):
  File "/home/redacted/.local/lib/python3.11/site-packages/mako/pyparser.py", line 36, in parse
    return _ast_util.parse(code, "<unknown>", mode)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/.local/lib/python3.11/site-packages/mako/_ast_util.py", line 91, in parse
    return compile(expr, filename, mode, PyCF_ONLY_AST)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: AST constructor recursion depth mismatch (before=63, after=65)

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

Traceback (most recent call last):
  File "/mnt/shared_profile/src/sap/makobug-reproducer/concourse/replicator.py", line 140, in render
    definition_descriptor = self._render(definition_descriptor)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/shared_profile/src/sap/makobug-reproducer/concourse/replicator.py", line 211, in _render
    t = mako.template.Template(template_contents, lookup=self.lookup)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/.local/lib/python3.11/site-packages/mako/template.py", line 300, in __init__
    (code, module) = _compile_text(self, text, filename)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/.local/lib/python3.11/site-packages/mako/template.py", line 677, in _compile_text
    source, lexer = _compile(
                    ^^^^^^^^^
  File "/home/redacted/.local/lib/python3.11/site-packages/mako/template.py", line 657, in _compile
    node = lexer.parse()
           ^^^^^^^^^^^^^
  File "/home/redacted/.local/lib/python3.11/site-packages/mako/lexer.py", line 248, in parse
    if self.match_python_block():
       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/.local/lib/python3.11/site-packages/mako/lexer.py", line 392, in match_python_block
    self.append_node(
  File "/home/redacted/.local/lib/python3.11/site-packages/mako/lexer.py", line 129, in append_node
    node = nodecls(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/.local/lib/python3.11/site-packages/mako/parsetree.py", line 158, in __init__
    self.code = ast.PythonCode(text, **self.exception_kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/.local/lib/python3.11/site-packages/mako/ast.py", line 42, in __init__
    expr = pyparser.parse(code.lstrip(), "exec", **exception_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/.local/lib/python3.11/site-packages/mako/pyparser.py", line 38, in parse
    raise exceptions.SyntaxException(
mako.exceptions.SyntaxException: (SystemError) AST constructor recursion depth mismatch (before=63, after=65) ('import os\n\nimport oci.auth as oa\nimport model.cont') at line: 2 char: 1

It is probably worth mentioning that by decreasing the template's output size, the likelihood of this error seems to become smaller.
I could share a copy of my somewhat slimmed-down reproducer; it still contains most of the code from the repository I referenced above, if this is considered helpful.

it could be a bug in py3.11 itself.   I haven't dealt with that code in probably more than 10 years so, sure, a real reproducer, as small as possible (it really should just be a single template) is an absolute minimum to do anything here.

I created a reproducer (makobug-reproducer.tar.gz).
To use, you need (obviously) python3.11 + install packages from requirements.txt.
To run, simply execute run-me.py
For your convenience, I also built an OCI Container Image (aka Docker Image); Dockerfile is included in uploaded tar-file. So as an alternative to installing and running locally, you might run:

docker pull eu.gcr.io/gardener-project/cc/makobug-reproducer:1
docker run eu.gcr.io/gardener-project/cc/makobug-reproducer:1 cc-utils/run-me.py

I hard-coded parameters such as amount of worker-threads (line 106, max_workers) and the amount of renderings to do (line 124, range).
To my experience, this script will yield exceptions as the one I pasted above almost always; I did see occasional runs were no stacktraces were printed. Re-running at most twice always gave stacktraces again.

hi that .tar.gz is 283 source files.  it's an entire application.
unfortunately I can't  run an unknown application of enormous complexity and unknown origin within my own environment; instead, please supply a single, self contained  mako template that reproduces the problem when compiled.
if this is not feasible, I'm sure if this issue is widespread it will soon enough be reported in other forms as python 3.11 gains adoption.

or print statements, or dump to a file, etc...

The best option is probably to try a custom version of mako that has
try:
  t = mako.template.Template(template_contents, lookup=self.lookup)
except SyntaxException:
  print(template_contents)
  raise

@zzzeek maybe doing something like this, probably logging to a logger, may make sense regardless of this issue though

Mako already does this, poster could also turn this on, see https://docs.makotemplates.org/en/latest/usage.html#handling-exceptions

@zzzeek : sorry for replying thus late. I dumped the contents of template_contents into a (gzipped) file
I created this using (as suggested) the following code-block:
 try:
     t = mako.template.Template(template_contents, lookup=self.lookup)
 except:
     with open('/src/sap/makobug-reproducer/template_contents.dump', 'w') as f:
         f.write(template_contents)

it is probably worth mentioning that using a bare except was the only way I could actually handle this exception. Neither of SystemError, mako.exceptions.SyntaxException, SyntaxError worked.

hi and thanks for this.
Unfortunately no error is reproduced, I can load this template under Python 3.11.3 and compile it without issue.
what happens if you use the given template in a program like this (assume you put the content into foo.mako)?

from mako.template import Template

t = Template(filename="foo.mako")
print(t.code)

what's the exact Python 3.11 version you are using?

Unfortunately no error is reproduced, I can load this template under Python 3.11.3 and compile it without issue.

did you try this w/ multithreading (at least two threads) and multiple executions? As I explained initially, this error occurs sporadically, and only (according to my observations) when concurrency is involved.
If using e.g. four threads, the issue occurs almost always at least once if doing the template-instantiation ~256 times
As stated above, I can reproduce this error in the following environments:

python3 alpine (3.11.3-r11) - running within a virtualisation container (aka docker container)
python (3.11.3-2 and 3.11.3-2) from arch linux (no virtualisation involved)

If running this just a couple of times, or running it hundreds / thousands of times, but single-threaded, this error never occurs. However, it occurs quite frequently if doing multithreading (but only as of python3.11).
I will try whether I can reproduce the error using the approach you shared and will write another update to this issue.

you can try adding threads to the POC but I can't see any way that threads would have an effect here, the Mako compilation process works on a local datastructure that is not accessible to other functions.  I had assumed the error was sporadic only because this particular template was not getting compiled every time.

it's also not clear why, if you are using a file-based TemplateLookup, that this template would be getting recompiled at all.  Mako writes a module file to disk and reuses that.

@zzzeek : originally, it was planned to have a multitude of templates. considering that we actually have just one (and might do some caching anyhow), I might change this and cache the template.
In the reproducer I uploaded the multithreading is done in the run-me.py script

Mako writes a module file to disk and reuses that.

@zzzeek : would you be so kind as to give me a hint to the code doing that? That might be a very good explanation for the race-condition I assume. Although not a good explanation of why this seems to only affect python3.11, admittedly.

hi -
You use a TemplateLookup and give it a file path to store modules, and then use the TemplateLookup to retrieve .mako files from the filesystem as compiled templates.
This works best when you have .mako files that you are loading and rendering in your application.
the second example at https://docs.makotemplates.org/en/latest/usage.html#using-templatelookup illustrates how to configure TemplateLookup with a file path.
The module caching thing is not readily available for on-the-fly templates, what you could do for on-the-fly templates is write them out to .mako files, then use TemplateLookup to access them.
Otherwise for local in-memory Template objects, Mako does not make use of global state when compiling, although there is a global set of compiled template modules (after the compilation is done) that are indirectly linked to template URLs or in-memory identifiers; I can see here there is a potential for key conflicts if you have anonymously-identified Template objects but this map isn't used when compilation proceeds.

The only thing I can see that could conceivably be some kind of "global" would be when we use the compile() Python builtin we pass a module identifier to it, and for an anonymous Template like you have, that identifer will be hash(id(template)), so there could be re-use of the same id with different template contents.    That would be very unusual if compile() somehow held onto state from a previous call.
There are many ways to fix your code here.  One is to put the lock in your code:
template_mutex = threading.Lock()

def step_template(name):
     step_file = ci.util.existing_file(os.path.join(steps_dir, name + '.mako'))

     with template_mutex:
         return mako.template.Template(filename=step_file)

Another, better and much more idiomatic way is to use TemplateLookup as mentioned, since these are file based templates:
lookup = TemplateLookup(directories=[steps_dir])

def step_template(name):
     step_file = ci.util.existing_file(os.path.join(steps_dir, name + '.mako'))

     return lookup.get_template(name + ".mako")

TemplateLookup uses a mutex for its compilation, so that would eliminate the problem.     Then, you will get a lot less compile calls if you give your lookup a module directory:
lookup = TemplateLookup(directories=[steps_dir], module_directory='/tmp/mako_modules')

def step_template(name):
     step_file = ci.util.existing_file(os.path.join(steps_dir, name + '.mako'))

     return lookup.get_template(name + ".mako")

your program will put .py files into /tmp/mako_modules that get reused.

I could further narrow the issue down. If I add just lock Template._compile_text and Template._compile_from_file from parallel execution, the issue also does not appear.
300         # if plain text, compile code in memory only
301         if text is not None:
302             with lock:
303                 (code, module) = _compile_text(self, text, filename)
304             self._code = code
305             self._source = text
306             ModuleInfo(module, None, self, filename, code, text, uri)
307         elif filename is not None:
308             # if template filename and a module directory, load
309             # a filesystem-based module file, generating if needed
310             if module_filename is not None:
311                 path = module_filename
312                 print(f'{module_filename=}')
313             elif module_directory is not None:
314                 print(f'{module_directory=}')
315                 path = os.path.abspath(
316                     os.path.join(
317                         os.path.normpath(module_directory), u_norm + ".py"
318                     )
319                 )
320             else:
321                 path = None
322             with lock:
323                 module = self._compile_from_file(path, filename)
324         else:
325             raise exceptions.RuntimeException(
326                 "Template requires text or filename"
327             )

_compile_from_file() calls _compile_text() so that code would deadlock if _compile_from_file() does not have a path

well I just successfully executed it w/o issues :-)

@zzzeek : switching to TemplateLookup sounds like a good idea, too. However, I still think there is a bug in template.Template. Instantiating multiple instances of a class and calling their methods should not run into race-conditions I think

At this point you should have enough information to create a single short script that demonstrates the problem, take my script at https://github.com/sqlalchemy/mako/issues/378#issuecomment-1600811371 and adjust

well I just successfully executed it w/o issues :-)

which means it's being called with a path, which seems to indicate there are other calls to TemplateLookup against the same file with different arguments

as far as I understand the code, _compile_from_file calls _compile_module_file, so no deadlock :-)
yeah, I think this should be feasible
My code calls Template at two locations. one time using a fpath, one time passing a string.
I also changed it to always pass a string (in this case, the race-condition still occurs - so I think there is a race-condition involved in the "_compile" method

technically, you sometimes do raise an exception already ;-)

as far as I understand the code, _compile_from_file calls _compile_module_file, so no deadlock :-)

take a look.  there's a conditional, so it can go either way

in my case, path is always None (I checked this by adding a print..)

I am not saying adding a lock is a good idea for a fix. this is how far I came in finding the root-cause

OK in your code you are locking outside _compile_text() , so that's why that's OK

I started (after observing that adding some caching will reduce likelihood of the error) to add lock to full __init__, then started to reduce the lines of code I had to lock and still not get an error

anyhow: using this knowledge, I can certainly fix my code. Still, I think this is a bug in mako - albeit one that might not affect many users besides me

it may very well be a bug in py3.11 itself.   since you can reproduce, work to iteratively reduce your program one step at a time, ensuring reproduction each time, down to a script that looks like this one

@zzzeek : interestingly, switching to mako.lookup.TemplateLookup as you suggested did seem to fix the issue (after removing the caching I added earlier, and of course, after removing again the lock I added to mako's code).
It will still be an interesting task to add a reproducer for sure.

I have also been encountering the same issue in my app. It also occurs intermittently and only with Python 3.11.
https://www.reddit.com/r/Tautulli/comments/1042t13/error_syntaxexception_systemerror_ast_constructor/
I am already using TemplateLookup.
https://github.com/Tautulli/Tautulli/blob/ea6c6078df410f333a060016dfce18c21ad134c9/plexpy/webserve.py#L126

I think I solved my issue. I was initializing a new TemplateLookup every single time I served a template. Re-factoring my code so that I only initialize it once seems to have fixed it.

OK but we want to figure out why concurrent calls to compile() is causing this problem (And also why my test script above does not seem to have this problem)

I have been trying to reproduce the error with a small test script but have been unsuccessful.

I thus far also did not succeed in creating a minified reproducer. Will update the issue once I do find some more time.

I am also seeing this occasionally pop up in a production application since updating to python 3.11. It's very rare, relative to the number of template renders.
We are using a customised TemplateLookup that inherits from the mako TemplateLookup. Thanks for all the information provided on this issue - I think that will really help narrow this down for us.

Just chiming in that I've also seen this behavior sporadically with Python 3.11
It occurs when using TemplateLookup.get_template. It's happening very rarely, I'd say about once a week in a nightly job that calls hundreds of renders via an API that uses mako.
Each API call handles a single render, the lookup looks roughly like:
lookup = TemplateLookup(directories=[templates_path])
try:
    template = lookup.get_template(specific_template)
except TemplateLookupException:
    template = lookup.get_template(common_template)
return template

Exception observed is:
API Exception: SyntaxException('(SystemError) AST constructor recursion depth mismatch (before=93, after=85) (\'if <condition>:pass\') in file <file_path>

This seems more an issue with python: this pytest issue reports the same problem without mako involvement https://github.com/pytest-dev/pytest/issues/10874

wow howd you find that?

someone in that pytest issue actually linked this one, and github links it if you scroll up

authors: CaselIT JonnyWong16 Mark-Hetherington ccwienk zsblevins zzzeek

repo: sqlalchemy/mako

license: mit


text:
Restore-DbaDatabase apply log backups with -FileMapping

Version 0.9.399
Have an existing database in full recovery. Using the latest full backup, restore it as a copy of that database. Use -FileMapping to provide the new physical files. Leave it in no recovery to restore transaction logs from the existing database to the newly restored database. Like log shipping.
Issue is that -FileMapping does not seem to work with -Continue parameter as the error message says cannot use the physical files of the existing database
Steps to Reproduce
<#
# Restore a full backup of a database
# Say for instance your database is called MyDB
# Restore it as MyDB2, to the same drives

# these 4 variables must be changed to suit
$db = 'MyDB2'
$filemap = @{'MyDB_Data'='D:\SQLData\MyDB2.mdf';'MyDB_log'='L:\SQLLogs\MyDB2_log.ldf'}
$pathFull = 'X:\SQLBackup\pathToFullBackup.bak'
$pathLogs = 'X:\SQLBackup\pathToLogBackups'

# This should restore the full backup as a second database in norecovery
Restore-DbaDatabase -SqlInstance localhost -Path $pathFull -DatabaseName $db -FileMapping $filemap -NoRecovery -WithReplace -MaintenanceSolutionBackup -Verbose # -OutputScriptOnly

# Now to restore transaction logs via -Continue
Restore-DbaDatabase -SqlInstance localhost -Path $pathLogs -DatabaseName $db -FileMapping $filemap -NoRecovery -MaintenanceSolutionBackup -Verbose -Continue # -OutputScriptOnly
# Cannot restore any log backups as the physical files of MyDB are in use (which we are not trying to use)

#>

Expected Behavior
Transaction log backups should restore
Actual Behavior
Error throws as if we we were trying to restore the physical files of the existing database
Environmental data

PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.42000
BuildVersion                   6.3.9600.18968
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2
Microsoft SQL Server 2016 (SP1-CU10-GDR) (KB4293808) - 13.0.4522.0 (X64)   Jul 17 2018 22:41:29   Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows Server 2012 R2 Standard 6.3  (Build 9600: ) (Hypervisor)

Having problems replicating this one.

$filemap = @{RestoreTimeClean = 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008R2SP2\MSSQL\DATA\MapClean.mdf'; RestoreTimeClean_log = 'C:\Program Files\Microsoft SQL Server\MS
SQL10_50.SQL2008R2SP2\MSSQL\DATA\mapclean_log.ldf'}

$null = Restore-DbaDatabase -SqlInstance localhost\sql2008r2sp2 -Path C:\github\appveyor-lab\RestoreTimeClean\RestoreTimeClean.bak -WithReplace

Get-DbaDatabaseFile -SqlInstance localhost\sql2008r2sp2 -Database restoretimeclean | select LogicalName, PhysicalName

$null = Restore-DbaDatabase -SqlInstance localhost\sql2008r2sp2 -Path C:\github\appveyor-lab\RestoreTimeClean\RestoreTimeClean.bak -DatabaseName rt2 -NoRecovery -WithReplace -FileMapping $filemap
$null = Restore-DbaDatabase -SqlInstance localhost\sql2008r2sp2 -Path C:\github\appveyor-lab\RestoreTimeClean\ -DatabaseName rt2 -Continue -FileMapping $filemap
 Get-DbaDatabaseFile -SqlInstance localhost\sql2008r2sp2 -Database rt2 | select LogicalName, PhysicalName

Which I'm pretty sure mirrors your logic. And it's working as expected.
Thats in ps V4, I just need to try and find a PS4 box to try it on as well to confirm.

Hi @Stuart-Moore ,

I think I'm doing the exact same as you, I can't quite believe it! I'm on dbatools version 0.9.381.
I wouldn't rule out that I'm doing something stupid though

No feedback from user since september, and I've never managed to replicate this even on PS4

authors: Stuart-Moore labyrinthsystems

repo: sqlcollaborative/dbatools


text:
Fix Repair-DbaOrphanUser skipping contained databases

Fix Repair-DbaOrphanUser skipping contained databases

Type of Change

[ ] Bug fix (non-breaking change, fixes #)
[x] New feature (non-breaking change, adds functionality)
[ ] Breaking change (effects multiple commands or functionality)
[x] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
[ ] Nunit test is included
[ ] Documentation
[ ] Build system

Purpose

Fix for issue #5887  so that contained databases are not ignored when attempting to fix orphaned users.
Approach

Eliminates the code that looks to see if the database is contained. The existing db level checks cover handling contained users correctly (see SQL below for DB creation on testing this).
Commands to test

Create database, logins, users, contained users, orphaned users using SQL code at https://gist.github.com/sirsql/760c0c052fbd3d7ef6be5c0f9db09887
Then run repair-dbadborphanuser -sqlinstance localhost
Screenshots

Learning

thanks @sirsql - while waiting for claudio's review, i reformatted it to OTSB standard using Invoke-DbatoolsFormatter. I'm not sure why this one in particular got reformatted, but wanted to let you know so that you can sync the branch before making any changes.

Hi @sirsql can you please also remove from Remove-DbaDbOrphanUser and Get-DbaDbOrphanUser to be equal on all commands

@sirsql - will you have time to update Remove and Get?

I'll get it done this weekend

Don't know what the deal is with the formatting.
Ran -
invoke-dbatoolsformatter "C:\Users\nic\OneDrive\Documents\GitHub\dbatools\functions\Get-DbaDbOrphanUser.ps1"
invoke-dbatoolsformatter "C:\Users\nic\OneDrive\Documents\GitHub\dbatools\functions\Repair-DbaDbOrphanUser.ps1"
Invoke-DbatoolsFormatter "C:\Users\nic\OneDrive\Documents\GitHub\dbatools\functions\Remove-DbaDbOrphanUser.ps1"

Also did a pull prior to doing anything else and there's the merge conflict (no conflict on my machine and able to pull from upstream without issues). Are there possible problems with the workspace setup that I am using in vscode?

I think your local branch is extremely out of date. I'll reformat the files then remove the changes to Remove- would you be able to update then resubmit a PR just for the single file?
The formatting issue may be a problem with the version of psscriptanalyzer which I've found to cause problems. @niphlod is there any way you can look into that? I have not been able to update psscriptanalyzer in months.

I just wanted to check in on this

Please comment on your issue whether this PR fixed you problem.
The fix was merged 3 months ago.

authors: ClaudioESSilva imyourdba potatoqualitee sirsql wsmelton


text:
missing dependency "libgconf-2-4"

I used the "Sqlectron_1.29.0_amd64.deb" on ubuntu 18.04 LTS and it didn't work, so I tried running it from command line and it complained about a missing dependency so I had to install it manually (libgconf-2-4).
I assume this dependency should be added to the deb file itself?

It is indeed missing from the deb file. Confirming here. Found the workaround here via Google: https://github.com/electron/electron/issues/1518
sudo apt-get install libgconf-2-4

Issue present in 1.30.0 on Arch install with Pacman.
Are there any updates on this? Do we even know what is causing it?

@LoveSponge the project is dead - switch to DBeaver: https://www.archlinux.org/packages/community/x86_64/dbeaver/

Are there any updates on this? Do we even know what is causing it?

What's causing it is that Chrome added a dependency on libgconf to function on Linux, except that it does not come with Chrome nor is it installed by default on most distros. After spending yet another day trying to get VirtualBox and Debian / Ubuntu OS to run inside of it (with both failing at different points of installation / runtime), I'm going to kick this issue and fixing it "properly" down the road to a later version and instead just update the README to say you need to install libgconf if on Linux. There's a good chance that just upgrade the version of electron / electron-builder that sqlectron uses will resolve this as well.

@seantcanavan I only realised after posting my comment;
Since then i've found Beekeeper Studio (link), a great alternative with active maintinence.

This project does have active maintenance, though my time is split amongst a number of things.
I want to think this issue has been fixed with 1.31.0, but it's hard for me to say as at least at the moment, I do not have a Linux environment to test on natively, and my last few attempts at setting up a VirtualBox image has been met with a number of annoying problems just installing debian / ubuntu, let alone getting them to run. It will definitely be fixed in 1.32.0 as I upgrade the electron and electron-builder dependencies which should definitely force gconf to be a dependency by default of building the project.

This was fixed in #507.

help I don't want to build from the source. discover says "dependency resolution failed". But it does not tell what dependency  :<

@dev-rsonx just switch to dbeaver already it's free and a million times better. It's fully cross-platform as well. https://dbeaver.io/download/

@dev-rsonx what linux distribution and version are you using?

authors: LoveSponge MasterOdin arakash92 dev-rsonx seantcanavan

repo: sqlectron/sqlectron-gui


text:
SQL Saturday Columbus 2023 - Site Adds

Please add the link to the schedule
https://sessionize.com/api/v2/piprkmwb/view/GridSmart
Please add the precon links
Understanding and Optimizing SQL Server Performance - Joey D'Antoni
https://www.eventbrite.com/e/657500942017
An Introduction to Python for Data Science and Data Engineering - Chris Hyde
https://www.eventbrite.com/e/657503609997

done
From: pshore73 @.>
Sent: Saturday, June 17, 2023 2:59 AM
To: sqlsaturday/sqlsatwebsite @.>
Cc: Subscribed @.***>
Subject: [sqlsaturday/sqlsatwebsite] SQL Saturday Columbus 2023 - Site Adds (Issue #201)
Please add the link to the schedule
https://sessionize.com/api/v2/piprkmwb/view/GridSmart
Please add the precon links
Understanding and Optimizing SQL Server Performance - Joey D'Antoni
https://www.eventbrite.com/e/657500942017
An Introduction to Python for Data Science and Data Engineering - Chris Hyde
https://www.eventbrite.com/e/657503609997
—
Reply to this email directly, view it on GitHubhttps://github.com/sqlsaturday/sqlsatwebsite/issues/201, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA6AGDD3EJNGAI37HB4M7EDXLUFOTANCNFSM6AAAAAAZJ5EUZQ.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
Redgate respects your privacy. To find out how we handle your personal data, see our privacy noticehttps://www.red-gate.com/privacy. Use of our software is subject to our license agreementhttps://www.red-gate.com/eula.
Our head office is Cavendish House, Cambridge Business Park, Cambridge, CB4 0XB, United Kingdom, and we are registered in the UK as company #3857576.

repo: sqlsaturday/sqlsatwebsite


text:
HttpLoggingInterceptor shows a gzipped response as a raw string

I use the standard HttpLoggingInterceptor with the log level set to Level.BODY. When the response from a server is gzipped HttpLoggingInterceptor shows it as a raw string (encoded). Is it expected behaviour? It doesn't seem to be very useful unless your server has some issue with gzip :)
pidcat:
OkHttp  D  <-- HTTP/1.1 200 OK (146ms)
        D  Date: Wed, 02 Dec 2015 10:53:01 GMT
        D  Server: Apache
        D  X-Frame-Options: SAMEORIGIN
        D  Access-Control-Allow-Origin: *
        D  Cache-Control: no-cache, private
        D  Pragma: no-cache
        D  Content-Encoding: gzip
        D  Vary: Accept-Encoding
        D  Content-Length: 367
        D  Keep-Alive: timeout=15, max=69
        D  Connection: Keep-Alive
        D  Content-Type: application/json;charset=UTF-8
        D  OkHttp-Selected-Protocol: http/1.1
        D  OkHttp-Sent-Millis: 1449053545316
        D  OkHttp-Received-Millis: 1449053545463
        D  ������������Œ�j�0EeЪG�a�rv&-$tQ(�.[���dd%%��{ӗ�d7bĜ;���2%�"�"dU���j����`�u�l�5¦�5
        D  6ݫr�
        D  �Y4�@UW�U��
        D  �� ����c_�����p�n�/�i:@*C5A��{����xt{,�    �RJy6�
                                                                             �9Ic)���t��E0������
                                                                                '!��JL2�e��Jɇԥ� _�k�x�3�bA36ޔ�'$ft�4���e

-ܸ�*t��<�A�� N#����tf���     ����tU���<���`�w��^���f�'�&��y�|��
      �:���r!�99{ժ�;���;�%�d���{�na�ս��|r�?.2������
        D  <-- END HTTP (367-byte body)

Is it expected behaviour?

In the sense that there's no logic to handle non-plain text bodies then yes, it behaves as we expect.
Are you adding this as a network interceptor or a normal interceptor? If you do not set it as a network interceptor you should see the plain-text body.

by adding it as a regular interceptor I'm getting decoded data :)
thanks @JakeWharton

Have tried to use HttpLoggingInterceptor as either network or application interceptor but in one case it doesn't show gzipped body. in another - all headers. Is there any default solution to log both? If no how hard is that to write one?

Best approach is to use Chuck or Charles.
https://github.com/jgilfelt/chuck
https://www.charlesproxy.com/

authors: JakeWharton jbaginski mikhailmelnik swankjesse

repo: square/okhttp