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

Migration: Failed to initialize ORM engine: strconv.ParseInt: parsing invalid syntax #1429

Closed
sbrl opened this issue Apr 1, 2017 · 6 comments

Comments

4 participants
@sbrl
Copy link

commented Apr 1, 2017

As per the conversation on gitter, another error has cropped up when migrating my gogs instance. Here it is:

2017/04/01 11:45:35 [...itea/routers/init.go:54 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: strconv.ParseInt: parsing "d0068f4327d3e71625b373c4db7b689e": invalid syntax

Gogs version: 0.10.1.0228

Filed upon request from @strk.

@strk

This comment has been minimized.

Copy link
Member

commented Apr 1, 2017

@lunny any idea about obtaining more details in the log ? That error message says nothing about which migration is failing and where

@sbrl maybe you can raise log level to TRACE ?

@strk

This comment has been minimized.

Copy link
Member

commented Apr 1, 2017

This is probably line 42 of models/migrations/v20.go:

       for _, name := range names {                                            
                userID, err := strconv.ParseInt(name, 10, 64)                   
                if err != nil {                                                 
                        log.Warn("ignore avatar %s rename: %v", name, err)      
                        continue                                                
                }                   

The error check seems to reveal it was intended to skip errors, but maybe ParseInt is a fatal rather than raising an error ?

@sbrl

This comment has been minimized.

Copy link
Author

commented Apr 1, 2017

@strk How do I raise the log level?

@strk

This comment has been minimized.

Copy link
Member

commented Apr 1, 2017

@sbrl LEVEL = Trace under [log] section of custom/conf/app.ini, see https://docs.gitea.io/en-us/config-cheat-sheet/

@sbrl

This comment has been minimized.

Copy link
Author

commented Apr 1, 2017

Updating to 1.1 from 1.1.0 appears to have resolved this issue.

@sbrl sbrl closed this Apr 1, 2017

@tboerger

This comment has been minimized.

Copy link
Member

commented Apr 1, 2017

Perfect, so 1.1.1 will solve another issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.