Weird errors with ddgc_populate_ia_dev
Opened this issue · 8 comments
@jbarrett I was trying to run the ddgc_populate_ia_dev.pl
script to get up-to-date with duck.co (as suggested by @jdorweiler), but I kept running into this issue:
It doesn't appear to be dependency related - I've updated fairly recently, and the script is definitely getting part-way through (I'm seeing a few IAs pop up locally - as well as having put some printing in there to confirm) - but it seems to then just give up!
Any ideas?
I'm seeing a similar error when I run it.
Use of uninitialized value in concatenation (.) or string at /home/ddgc/community-platform/script/../lib/DDGC/DB/Base/Result.pm line 280.
SQL::Abstract::puke(): [SQL::Abstract::__ANON__] Fatal: Operator calls in update must be in the form { -op => $arg } at /home/ddgc/community-platform/script/../lib/DDGC/DB/Result/InstantAnswer.pm line 549
DBIx::Class::Storage::TxnScopeGuard::DESTROY(): A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit commit or error. Rolling back. at /opt/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/DBIx/Class/Exception.pm line 77
@jbarrett @jdorweiler I think it is to do with the maintainer field.
I checked the $data->{$ia_id}
hash, and for the ones that were getting through the maintainer
field was undefined, but it failed whenever one came up in the form:
maintainer => {
duckco => ...,
github => ...
}
I set the maintainer
field to undef
for each of them, and it ran much more smoothly (albeit without any maintainers). I guess that explains why it was complaining about a hash!
Fixed on #1284. Thanks @GuiltyDolphin for the bug report!
@MariagraziaAlastra @jbarrett Just tried it (#1284) out locally and I'm getting a different error now:
When you have errors like this, use some tool like Devel::Confess to get a more comprehensive stack trace, including context and arguments.
Also, don't screenshot errors, that's the least useful way you could ever report text-based error.
Copy paste the whole text, and put it in a block with
```
text here
```
Then you might be able to work out what's going on. ( And people who have similar errors will be able to search for them, because search can't index the text content of images... )
@jbarrett @jdorweiler I've just re-run it again and it went all the way without crashing (there were a bunch of concatenation errors though - but nothing fatal). It's now got ~ 800 live IAs showing 😀
I'll let you know if the errors start popping up again.
Thanks @GuiltyDolphin - there's a stringification override causing the concat warnings. You can safely ignore them, but I wonder if the override is worth keeping.
It is kind of sort of useful when working in a REPL and such.
@jbarrett Might it be worth returning another string when the override fails? So we don't get all the errors but can keep the functionality when it works.