Archive

Archive for July, 2009

Bug in myListBoard.Com tags

July 30th, 2009

I found a bug in the tagging feature of myListBoard.com.  The bug manifests as you create a new list using a tag that has been used for more than 6 or more times in your other lists.

Request Method: GET
Request URL: http://localhost:8000/users/cy/
Exception Type: TemplateSyntaxError
Exception Value: Caught an exception while rendering: invalid literal for int() with base 10: ”
Exception Location: /usr/local/lib/python2.6/dist-packages/django/template/debug.py in render_node, line 81
Python Executable: /usr/bin/python

Here is the code in my template that causes the error:

<a class="tagcloud" style="font-size: {{ tag.font_size|add:"12" href="/users/{{ userviewed }}/lists/tagged/{{ tag.name }}/">{{ tag.name }}</a>

The culprit in the above code is the statement: {{ tag.font_size|add:"12" }}, the font_size property of the tag object doesn’t seem to return a value that could be safely converted to a number.

I have been using http://code.google.com/p/django-tagging/ to implement tagging in myListBoard.com.

I think the problem is with the steps option on the tagging_tags tags of the django-tagging application which defaults to the value of 7. When a list is created using a tag that has been used 6 times, there might some math in the django-tagging application that I didn’t bother to look into.

So being a lazy coder, I instead replaced the culprit code with this:
{{ tag.count|add:"12" }}.

That solved the problem and the tags still grows as the number of usage grows too. After uploading my changes, the site seems to work okay even with many uses of the same tag on a list.

I might be missing something with the use of the font_size property but hey myListBoard.com is already in production, so any quick solution is acceptable at this time. :)

Author: Cyril Pauya Categories: projects Tags: , ,

Computer cannot get an IP address from DHCP server

July 13th, 2009

My office-mate had this weird problem with his computer: It cannot get an IP address from our DHCP server.  The motherboard of his PC is an Asus P5GC-MX.  He runs VMWare Player and Virtual Box, desktop virtualization software necessary for job, and all virtual machines have IP addresses, except the host machine.  To cut the story short, we did the following to diagnose the problem:

  • checked the UTP wire;
  • checked Windows XP’s firewall and network settings;
  • checked that the computer is set to automatically obtain an IP address;
  • used his wire with another computer;
  • used a virtual machine in his computer to get an IP address;
  • reset the computer a lot of times;

All steps failed to get an IP address for his computer from our DHCP server.

Read more…

Author: Cyril Pauya Categories: Network Tags: , , ,

Back from slumber.

July 9th, 2009

Hi.  It’s been a long time since I have updated my blog and a lot has happened since.  Here’s for a quick post:

  • I have switched operating systems from Microsoft Windows XP with SP3 to Ubuntu Jaunty 9.04.  Why?  It’s FREE, it’s open source, it has very minimal threat with viruses and other malicious software, it’s very configurable, and it now supports dual-monitor seamlessly. :D
  • I have uploaded the beta version of myListBoard.com – it’s a website that allows you to create a list and share it with others.  A lot of features are planned but I just can’t find the time to continue development nowadays.
  • I have moved back to Midsayap, Cotabato, my dear hometown; where water is out every 5:30am to 10:00am and from 3:00pm to 6:00pm; where electrical black-outs happen almost daily; and where my friends and family are close.
  • I have also resumed from being on-leave for 5 months at Notre Dame of Midsayap College – the first Notre Dame school in Asia!  If you can’t access the link, then you know it’s black-out in our area again.  (we hope to fix this black-out problem soon)

Keep posted for many new updates. :)

    Author: Cyril Pauya Categories: General Tags: , , ,