小编Mr.*_*key的帖子

数据目录是由 PostgreSQL 版本 13 初始化的,与此版本 14.0 不兼容

我已将 Portainer 下载到我的服务器上,并在其中的容器中创建了一个 PostgreSQL 数据库。今天我无法再访问数据库。日志显示一条​​消息,表明存在版本问题。

我已经读到了一些类似的问题,例如在容器的映像更新到最新版本后,Postgres 容器因“数据库文件与服务器不兼容”而崩溃,在容器的映像更新为后,Postgres 容器因“数据库文件与服务器不兼容”而崩溃最新的

并且解决方案brew postgresql-upgrade-database不起作用。

我能做些什么?

日志

2021-10-03  [1] FATAL:  database files are incompatible with server
2021-10-03  [1] DETAIL:  The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 14.0 (Debian 14.0-1.pgdg110+1).

PostgreSQL Database directory appears to contain a database; Skipping initialization
Run Code Online (Sandbox Code Playgroud)

我还发现了这个https://www.postgresql.org/docs/14/upgrading.html但命令不起作用。我是否需要以某种方式在容器中执行此操作,或者哪些命令可以使其在容器中运行?

postgresql debian docker portainer

72
推荐指数
6
解决办法
8万
查看次数

如果条件与数据框

我想要如果条件成立,df[df["tg"] > 10然后df[df["tg"] < 32乘以五,否则除以二。但是,我收到以下错误

ValueError:DataFrame 的真值不明确。使用 a.empty、a.bool()、a.item()、a.any() 或 a.all()。

d = {'year': [2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001],
     'day': [1, 2, 3, 4, 1, 2, 3, 4,],
     'month': [1, 1, 1, 1, 2, 2, 2, 2],
     'tg': [10, 11, 12, 13, 50, 21, -1, 23],
     'rain': [1, 2, 3, 2, 4, 1, 2, 1]}
df = pd.DataFrame(data=d)
print(df)


[OUT]

   year  day  month  tg  rain
0  2001    1      1  10     1
1  2001    2 …
Run Code Online (Sandbox Code Playgroud)

python dataframe pandas

10
推荐指数
1
解决办法
783
查看次数

输入字段焦点上不显示边框

我创建了一个 SCSS 类section-readonly-input。这不应该显示边框。我现在遇到以下问题,当我单击输入字段时,仍然显示边框。但这不应该。不应显示边框。

我的问题是,如何重写我的 SCSS,以便单击它时不显示边框?我正在使用框架 Bulma。

import React from "react";
import "./style/General.scss";

function General() {
  return (
    <div>
      <div className="field">
        <p className="control has-icons-left has-icons-right">
          <input
            className="section-readonly-input"
            type="text"
            value="This text is readonly"
            readonly
          />
          <span className="icon is-small is-left">
            <i className="fas fa-futbol"></i>
          </span>
        </p>
      </div>
    </div>
  );
}

export default General;
Run Code Online (Sandbox Code Playgroud)

通用.scss

.section-readonly-input {
  outline: none !important;
  border-width: 0px !important;
  border: none !important;
  &:hover {
    outline: none !important;
    border-width: 0px !important;
    border: none !important;
  }
  &:focus {
    outline: none !important; …
Run Code Online (Sandbox Code Playgroud)

css sass reactjs

1
推荐指数
1
解决办法
2921
查看次数

标签 统计

css ×1

dataframe ×1

debian ×1

docker ×1

pandas ×1

portainer ×1

postgresql ×1

python ×1

reactjs ×1

sass ×1