After going through the livecd process which was smooth and uneventful, when it came to the reboot back into the installed system, all I got was a blinking cursor on a black screen.
This is caused by Grub not being installed properly, for whatever reason.
The solution was for me to mount my filesystem (/dev/sda1 in my case) and use the "grub-install --root-directory=/mount/point/ /dev/sda" command. If I didn't add the --root-directory option, it would fail.
Rebooting again allowed me to log in.
Not impressed Canonical. I'll keep going with this OS for a bit, but when it comes to reliability and usefulness, I stick with Gentoo.
Update:
The problem is with one of the raid packages, as this also occurs on Debian 7 in the same situation. It's not an Ubuntu-specific problem, but upstream. Still, with such a blocker for an install, I don't see how it could have crept through TWO different distribution QA phases.
Thursday, 25 April 2013
Wednesday, 27 March 2013
Django: Common Errors, variables not appearing
While it's against the django mindset, I have done a few copy-pastes in my time using this framework.
Recently I've been doing some copy-pasting of some modules and found that often I was getting blank lines when retrieving variables.
The problem was that my text editor was fudging with the tab order of some of the lines-- a huge problem in python-based programs. My Meta class was tabbed forward so it was part of the method, not the class. By de-tabbing it, I was able to see my variables as expected.
Sometimes it's the small things.
If such a scenario exists, a better idea that goes along with the DRY principle would be to create one base Form class with the Meta class and have all other classes inherit it appropriately.
Recently I've been doing some copy-pasting of some modules and found that often I was getting blank lines when retrieving variables.
The problem was that my text editor was fudging with the tab order of some of the lines-- a huge problem in python-based programs. My Meta class was tabbed forward so it was part of the method, not the class. By de-tabbing it, I was able to see my variables as expected.
Sometimes it's the small things.
If such a scenario exists, a better idea that goes along with the DRY principle would be to create one base Form class with the Meta class and have all other classes inherit it appropriately.
Tuesday, 19 March 2013
Django: Python Unchained
So I've been doing a lot of work with django lately (https://www.djangoproject.com/) and it has been an excellent MVC so far. Python in particular is very powerful and I've had 3+ years of experience with it, as opposed to CakePHP and Ruby on Rails (PHP/Ruby).
However, MVC's are not without their difficulties, even though they do save time and effort. Documentation has always been the #1 issue when using other people's software, and to this day there have only been a couple bits of software I've used with proper docs. Python and KDE are two big names at the top of my head.
I experienced one such django issue for which there wasn't a clear answer to what I was experiencing, and with the interests of newbies in mind, I will document some of those weird django errors in this blog.
Problem: Django is not displaying a view and gives 404 errors, doesn't report URLs that are defined in the urls.py file.
Solution: Every definition of the urlpatterns variable must include a blank string at the start of the tuple parameter you supply.
Wrong:
urlpatterns = patterns(url(r'^index/', index.index),
)
Right:
urlpatterns = patterns('',
url(r'^index/', index.index),
)
In hindsight, it would be a simple fix if I knew what pattern() required. I hope this helps at least one other person.
Cheers.
p.s. I *would* like to format code snippets properly, but apparently Blogger is incapable of doing so without some css/javascript tweaking. =/
However, MVC's are not without their difficulties, even though they do save time and effort. Documentation has always been the #1 issue when using other people's software, and to this day there have only been a couple bits of software I've used with proper docs. Python and KDE are two big names at the top of my head.
I experienced one such django issue for which there wasn't a clear answer to what I was experiencing, and with the interests of newbies in mind, I will document some of those weird django errors in this blog.
Problem: Django is not displaying a view and gives 404 errors, doesn't report URLs that are defined in the urls.py file.
Solution: Every definition of the urlpatterns variable must include a blank string at the start of the tuple parameter you supply.
Wrong:
urlpatterns = patterns(url(r'^index/', index.index),
)
Right:
urlpatterns = patterns('',
url(r'^index/', index.index),
)
In hindsight, it would be a simple fix if I knew what pattern() required. I hope this helps at least one other person.
Cheers.
p.s. I *would* like to format code snippets properly, but apparently Blogger is incapable of doing so without some css/javascript tweaking. =/
Subscribe to:
Posts (Atom)