Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error " request failed with status code 400 " raised when trying to import an Excel file #1313

Closed
okaeiz opened this issue Feb 21, 2022 · 6 comments
Assignees

Comments

@okaeiz
Copy link

okaeiz commented Feb 21, 2022

  • Project Info

Node: v12.22.6
Arch: x64
Platform: linux
Docker: true
Database: mysql2
ProjectOnRootDB: true
RootDB: mysql2
PackageVersion: 0.84.12

  • Steps To Reproduce
    When creating a new project using an Excel file, error " request failed with status code 400 " is raised. The column headers are visible but we cannot see the rest of the data ( rows haven't been imported ).
    We cannot also see the Kanban view and Calendar view of our databases.

  • Expected behavior
    We expected to have our Excel file completely imported; with all rows and columns.

Screenshot (2)

Join our discord : https://discord.gg/5RgZmkW for realtime help.

Node version : v12.22.1
Arch type: x64
Platform: linux
Docker: true
Database: sqlite3
packageVersion: 0.9.27

@wingkwong wingkwong self-assigned this Feb 21, 2022
@wingkwong
Copy link
Member

Able to reproduce only in docker-compose

@dstala
Copy link
Member

dstala commented Feb 21, 2022

We cannot also see the Kanban view and Calendar view of our databases.

Right now, Kanban & Calendar views are under development, not deployed yet. Grid/ Gallery & Form view are options available.

@wingkwong
Copy link
Member

wingkwong commented Feb 21, 2022

Checked with the user. The excel file contains data with Persian characters. By default, mysql is using latin1_swedish_ci. It can be proved by running the following SQL query.

SELECT SCHEMA_NAME 'database', default_character_set_name 'charset', DEFAULT_COLLATION_NAME 'collation' FROM information_schema.SCHEMATA;

You should see

+--------------------+---------+-------------------+
| database           | charset | collation         |
+--------------------+---------+-------------------+
| information_schema | utf8    | utf8_general_ci   |
| root_db            | latin1  | latin1_swedish_ci |
+--------------------+---------+-------------------+

Hence, adding the following line will change the character set and collation.

command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci

Example:

image

Running the same query

SELECT SCHEMA_NAME 'database', default_character_set_name 'charset', DEFAULT_COLLATION_NAME 'collation' FROM information_schema.SCHEMATA;

Result:

+--------------------+---------+--------------------+
| database           | charset | collation          |
+--------------------+---------+--------------------+
| information_schema | utf8    | utf8_general_ci    |
| root_db            | utf8mb4 | utf8mb4_unicode_ci |
+--------------------+---------+--------------------+

P.S - You may need to remove the existing volume mysql_db_data first.

@wingkwong
Copy link
Member

Included an example in a9481dd.

@github-actions
Copy link
Contributor

Fixed in v0.84.13.

@adamlaska
Copy link

Fixed in v0.84.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants