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

Closed
opened 2025-11-02 03:29:40 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @sbrl on GitHub (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.

Originally created by @sbrl on GitHub (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.
GiteaMirror added the issue/duplicate label 2025-11-02 03:29:40 -06:00
Author
Owner

@strk commented on GitHub (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 commented on GitHub (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 ?
Author
Owner

@strk commented on GitHub (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 ?

@strk commented on GitHub (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 ?
Author
Owner

@sbrl commented on GitHub (Apr 1, 2017):

@strk How do I raise the log level?

@sbrl commented on GitHub (Apr 1, 2017): @strk How do I raise the log level?
Author
Owner

@strk commented on GitHub (Apr 1, 2017):

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

@strk commented on GitHub (Apr 1, 2017): @sbrl `LEVEL = Trace` under `[log]` section of `custom/conf/app.ini`, see https://docs.gitea.io/en-us/config-cheat-sheet/
Author
Owner

@sbrl commented on GitHub (Apr 1, 2017):

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

@sbrl commented on GitHub (Apr 1, 2017): Updating to 1.1 from 1.1.0 appears to have resolved this issue.
Author
Owner

@tboerger commented on GitHub (Apr 1, 2017):

Perfect, so 1.1.1 will solve another issue

@tboerger commented on GitHub (Apr 1, 2017): Perfect, so 1.1.1 will solve another issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#603