Opened 4 years ago
Closed 3 years ago
#5603 closed defect (no-action)
Error when running dbupdate after adding audio media-type
Reported by: | Andrew | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | programming | Keywords: | migration, audio |
Cc: | michael@… | Parent Tickets: |
Description
One of my coworkers is running into this issue while trying to add audio support to our GMG instance. I'm posting it for them because it's currently not possible to sign up for new accounts on this bug tracker. Thanks! : )
I am following these instructions for audio:
https://mediagoblin.readthedocs.io/en/stable/siteadmin/media-types.html
We have video, image, and pdf media types enabled. I am trying to add
audio. I have added the dependencies. I get an AssertionError when
adding mediagoblin.media_types.audio under the [plugins] section of
my mediagoblin_local.ini file.
"/srv/ccs-mediagoblin/mediagoblin/mediagoblin/db/migration_tools.py", line
132, in migrations_to_run
assert self.database_current_migration is not None
AssertionError
The full traceback is identical to this unanswered mailing list message:
https://lists.mediagoblin.org/pipermail/devel/2019-March/003243.html
Version: gmg 0.9.0 stable
I think it is referencing the pdf version being 0 in the database.
psql mediagoblin
psql (9.3.24)
Type "help" for help.
mediagoblin=> SELECT * FROM coremigrations WHERE
name='mediagoblin.media_types.pdf';
name | version
mediagoblin.media_types.pdf | 0
(1 row)
Changing 0 to 1 does not have an effect.
If I remove the mediagoblin.media_types.audio line from
mediagoblin_local.ini, the ./bin/gmg dbupdate command completes.
I did some of my own research about this issue. I wonder if this is related to the following file being nearly empty:
mediagoblin.git/mediagoblin/media_types/audio/migrations.py
It contains only: "MIGRATIONS = {}", whereas the 'video' analog contains more.
Any insights into this issue are appreciated. Thanks! : )
Change History (9)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Thanks for your help Ben. We're running Trisquel 7, which is based on Ubuntu 14.04, and are using Python2.
The person you spoke with in #mediagoblin is my coworker. It sounds like we should be making an upgrade to our installation.
Thanks again for your help! : )
comment:3 by , 4 years ago
Hi Andrew,
I'd be very happy to roll my sleeves up and help the FSF with this MediaGoblin upgrade if that would be useful.
Trisquel 7 has Python 3.4 I believe, which I'd highly recommend if you're doing a MediaGoblin upgrade anyway.
Regards,
Ben
comment:4 by , 4 years ago
By the way, Trac registrations are now fixed. Issue was just that the upstream changes hadn't been pulled down.
comment:6 by , 4 years ago
Two updates:
- I also tried to just upload an ogg and it worked! This dbupgrade problem is not a blocker at the moment.
- I have rebased our changes onto v0.10.0. Upgrading the site will take a bit longer.
We will see if this dbupgrade problem is still an issue after the upgrade.
comment:7 by , 4 years ago
I have dev upgraded to Trisquel 9 (based on Ubuntu 18.04), MediaGoblin 0.10.0, and Python 3.6.9. This database issue persists.
I was able to upload audio files to 0.9.0. Now I get "Internal Server Error" when accessing a page that would have them visible.
follow-up: 9 comment:8 by , 4 years ago
I fixed it! I was able to enable audio media type and play audio files in 0.10.0.
psql mediagoblin
INSERT INTO coremigrations (name, version) VALUES('mediagoblin.media_types.audio', '0');
\q
./bin/gmg dbupdate
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 52bf0ccbedc1 -> e9212d3a12d3, Audio media type initial migration
comment:9 by , 3 years ago
Resolution: | → no-action-required |
---|---|
Status: | new → closed |
Replying to thomzane:
I fixed it! I was able to enable audio media type and play audio files in 0.10.0.
psql mediagoblin
INSERT INTO coremigrations (name, version) VALUES('mediagoblin.media_types.audio', '0');
\q
./bin/gmg dbupdate
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 52bf0ccbedc1 -> e9212d3a12d3, Audio media type initial migration
Hi Michael,
Sorry for the slow reply. Glad you were able to fix this. I'm not entirely clear on why this happened, but given there has been quite a lot of change with the upgrades to Python 3 and the new audio spectrograms, it's probably not worth investigating too deeply now.
Regards,
Ben
Thanks Andrew, I thought we'd fixed the registration issue, so I'll be taking another look at it.
Firstly, can you tell us what operating system you're on and whether MediaGoblin is running under Python 2 or Python 3 please?
We're planning to release MediaGoblin 0.10.0 in a few days time, so I'd suggest we look at upgrading you from 0.9.0 to "master". If your setup is similar to that described in our "Deploying" docs with an unpriviledged user called "mediagoblin", that might look like this:
Drop in to IRC and happy to give you a hand if required. We've had another report of a similar issue today.