How to fix a compatibility problem with django and sqlite? - sqlite

I'm trying to add a project in my django admin panel, but get an OperationalError. I was searching and found that is a
compatibility problem. How can i set other version of sqlite3 in my project?
I tried to install some other version of sqlite but doesn't work. I also search in the documentation of django and other pleases but nothing so far.
This is my Project model:
class Project(models.Model):
title = models.CharField(max_length=200)
description = models.TextField()
image = models.ImageField() .
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
And this is the OperationalError:
OperationalError at /admin/portfolio/proyect/add/
no such table: main.auth_user__old
Request Method: POST
Request URL: http://127.0.0.1:8000/admin/portfolio/proyect/add/
Django Version: 2.0.2
Exception Type: OperationalError
Exception Value:
no such table: main.auth_user__old
Exception Location: /Users/carloseduardoloreshernandez/anaconda3/envs/django2/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py in execute, line 303
Python Executable: /Users/carloseduardoloreshernandez/anaconda3/envs/django2/bin/python
Python Version: 3.7.4
Python Path:
['/Users/carloseduardoloreshernandez/Desktop/Apps/Personal/Python/Django2-Udemy/Web '
'personal/Web-personal-Django2/Backend',
'/Users/carloseduardoloreshernandez/anaconda3/envs/django2/lib/python37.zip',
'/Users/carloseduardoloreshernandez/anaconda3/envs/django2/lib/python3.7',
'/Users/carloseduardoloreshernandez/anaconda3/envs/django2/lib/python3.7/lib-dynload',
'/Users/carloseduardoloreshernandez/anaconda3/envs/django2/lib/python3.7/site-packages']
Server time: Dom, 15 Sep 2019 10:10:05 +0000

I solved it making a django upgrade:
pip install django --upgrade
then a migration:
python manage.py migrate
now all is working perfectly.

Related

how to fix Botman error with conversation?

BotMan Version: 2.6
PHP Version: 8.1
Symfony Version : 5.4
Cache Driver: Symfony Cache
i'm using botman for telegram bot. everything is ok with botman just the conversation is not working
The question is asked, but when I answer, I see such an error.
An exception has been thrown during the rendering of a template ("Warning: is_file(): Unable to find the wrapper "closure" - did you forget to enable it when you configured PHP?").
Can someone help?
Tried to install php 8.2. Similarly
DriverManager::loadDriver(TelegramDriver::class);
$adapter = new FilesystemAdapter();
$botman = BotManFactory::create($this->config, new SymfonyCache($adapter));

Building CorDapps against a non-release branch

I need some help installing a non-release branch of Corda for doing some testing with the TokenSDK. I must be doing something wrong because I am getting errors in IntelliJ.
OS: Tested on Windows 10 & Ubuntu 18.04.3 LTS
I am following the steps from the documentation: link
Step 1) Clone the Corda Repository:
git clone https://github.com/corda/corda.git
Step 2) Checkout the specific branch I need:
git checkout release/os/4.3
Step 3) Opening the constants.properties file I see:
cordaVersion=4.3-SNAPSHOT
gradlePluginsVersion=5.0.4
Step 4) Clone the Gradle Plugins repository:
git clone https://github.com/corda/corda-gradle-plugins.git
Step 5) Checkout the tag listed in the constants.properties file:
git checkout release/5.0.4
Step 6) Install the Gradle Plugins locally (run from the corda-gradle-plugins folder):
gradlew install
Step 7) Publish Corda to my local Maven repository (run from the corda folder):
gradlew install
Step 8) Download the Java template:
git clone https://github.com/corda/cordapp-template-java.git
Step 9) Open the java template in IntelliJ and setup the Project SDK, import module etc.
Step 10) Open the root build.gradle file and change:
corda_release_version = '4.1'
corda_gradle_plugins_version = '4.0.45'
to:
corda_release_version = '4.3-SNAPSHOT'
corda_gradle_plugins_version = '5.0.4'
After gradle refreshes I get the following errors:
No signature of method: org.gradle.api.internal.provider.DefaultPropertyState.convention() is applicable for argument types: (java.lang.String) values: [co.paralleluniverse]
Open File
"Open File" is a link that takes me to this line in the root build.gradle file:
apply plugin: 'net.corda.plugins.quasar-utils'
More Errors:
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'net.corda.plugins.quasar-utils']
Caused by: org.gradle.api.reflect.ObjectInstantiationException: Could not create an instance of type net.corda.plugins.QuasarExtension_
Caused by: groovy.lang.MissingMethodException: No signature of method: org.gradle.api.internal.provider.DefaultPropertyState.convention() is applicable for argument types: (java.lang.String) values: [co.paralleluniverse]
Am I missing a step or doing one incorrectly?
Since Corda4.3, Corda has moved onto a quarterly release schedule. I am confident that we will bring the features to the community as soon as possible. Please stay tuned with us at https://www.corda.net/

Kong refuses to recognise custom plugin as enabled

I was developing a Custom plugin for Kong.
To start off I followed guidelines listed in this tutorial
http://streamdata.io/blog/developing-an-helloworld-kong-plugin/
Few changes that I made along the way were changing dependency in the rockspec file for "lrexlib-pcre" from version 2.8.0-1 to 2.7.2-1 due to compilation problems that I faced with 2.8.0-1 version.
Please note that I am working in the next branch. The master branch has version 2.7.2-1 listed.
The tutorial assumes Kong version 0.4.2-1 while I am working with Kong version 0.5.2-1.
I have listed my plugin in kong.yml. Last listed is helloworld plugin
plugins_available:
- ssl
- jwt
- acl
- cors
- oauth2
- tcp-log
- udp-log
- file-log
- http-log
- key-auth
- hmac-auth
- basic-auth
- ip-restriction
- mashape-analytics
- request-transformer
- response-transformer
- request-size-limiting
- rate-limiting
- response-ratelimiting
- helloworld
I have listed the helloworld files in rockspec file at the last.
["kong.plugins.helloworld.handler"] =
"kong/plugins/helloworld/handler.lua",
["kong.plugins.helloworld.access"] = "kong/plugins/helloworld/access.lua",
["kong.plugins.helloworld.schema"] = "kong/plugins/helloworld/schema.lua"
Compilation is successful but kong refuses to list helloworld plugin as available in the node. All other builtin plugins are shown as available in the server
I tried enabling the plugin anyway with mock api. It doesn't work as expected and trying to restart kong lists error
nginx: [error] [lua] init_by_lua:5: Startup error:
/usr/local/share/lua/5.1/kong.lua:82: You are using a plugin that has
not been enabled in the configuration: helloworld [INFO] dnsmasq
stopped [ERR] Could not start Kong
I know there were some breaking changes introduced in Kong version 0.5. I followed the changelog, but I found nothing that would help.
Am i missing a setting a configuration somewhere?
Any help would be appreciated.
Try the following in your kong.yml:
custom_plugins:
- helloworld
I fixed this issue by adding things in custom_plugins and lua_package_path.
Here are the steps to enable and use custom plugin in kong Env.
1 - Add custom plugin name in --- custom_plugins = hello-world
2 - Install hello-world plugin by using following steps ---
If you have source code of your plugin then move into it and execute the command --- "luarocks make"
it will install your plugin.
now you have to execute a command "make install-dev" make sure your plugin have makefile like as --
Once you execute this command "make install-dev". it will create lua file at a location something like that -
/your-plugin-path/lua_modules/share/lua/5.1/kong/plugins/your-plugin-name/?.lua
just copy this path and add it into the kong configuration file in lua_package_path
Something like that --
lua_package_path=/your-plugin-path/lua_modules/share/lua/5.1/kong/plugins/your-plugin-name/?.lua
Now you done your job.
Just start kong -- kong start --vv
You will see that the plugin loaded into kong plugin env.
#Enjoy

Springfuse - Failed to execute goal: generate

I try to generate an Eclipse Project with Springfuse code generator, based on a MySql database. I have filled up the form at http://www.springfuse.com/, and it generated following Maven command:
mvn -U archetype:generate -DarchetypeGroupId=com.springfuse.archetypes -DarchetypeArtifactId=quickstart -DarchetypeVersion=3.0.108 -DgroupId=com.company.demo -Dpackage=com.company.demo -DartifactId=myproject -Dversion=1.0.0 -DfrontEnd=jsf2Spring -Demail=peter.varga.sp#gmail.com -Dpassword=none -DjdbcGroupId=mysql -DjdbcArtifactId=mysql-connector-java -DjdbcVersion=5.1.25 -DjdbcDriver=com.mysql.jdbc.Driver -DjdbcUser=root -DjdbcPassword=qwe123 -DjdbcUrl=jdbc:mysql://localhost/test -DinteractiveMode=false -DarchetypeRepository=http://maven2.springfuse.com/
I opened a command window, copied the command as it is, and run it, but got following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.springfuse.archetypes:quickstart:3.0.108) -> [Help 1]
My environment details:
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00)
Maven home: c:\Prog\Maven\Maven.3.2.1
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: c:\Program Files\Java\jdk1.7.0_51\jre
Default locale: en_US, platform encoding: Cp1250
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Does anybody has an idea, what the problem is?
Thanks.
Please check the settings of proxy / firewall springfuse. Also check the Apache Maven, because it needs to download the dependencies on the Internet. And if it fails, then its usually you need to tell him about the http proxy you need to use.

jruby on rails with jdbc

Hy,
I am a new in JRuby on Rails. I installed RadRails and many gems:
pieces of gems
activerecord (2.3.4)
ActiveRecord-JDBC (0.5)
activerecord-jdbc-adapter (1.2.9)
activerecord-jdbcmysql-adapter (1.2.9)
jdbc-mysql (5.1.24)
book: http://koti.kapsi.fi/jamo/priv2/JRuby%20on%20Rails,%202007.pdf
I read the following section called "Store Administration" in chapter 4 and I modified my config/database.yml to this:
development:
adapter: jdbc
driver: com.mysql.jdbc.Driver
url: jdbc:mysql://my_host/my_database
username: my_user
password: my_pass
I added to build path the following:
C:\Program Files\Aptana RadRails\plugins\org.jruby_1.2.0.9419p2\lib\ruby\gems\1.8\gems\jdbc-mysql-5.1.24\
When I restarted the server I got the following error:
Status: 500 Internal Server Error
The driver encountered an error: cannot load Java class com.mysql.jdbc.Driver
C:/Program Files/Aptana RadRails/plugins/org.jruby_1.2.0.9419p2/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.5/lib/active_record/connection_adapters/jdbc_adapter.rb:265:in `initialize'
C:/Program Files/Aptana RadRails/plugins/org.jruby_1.2.0.9419p2/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.5/lib/active_record/connection_adapters/jdbc_adapter.rb:41:in `jdbc_connection'
I would like to ask your help.
Have you added the jdbc jar to your class path? Try copying the jar file directly to the lib directory under your jruby installation.
e.g. C:\jruby\lib\mysql-jdbc.jar.

Resources