Friday, December 27, 2013

When creating a project in django using the tutorial at https://docs.djangoproject.com/en/1.6/intro/tutorial01/, I was getting an import error when running at the command line which asked if I was on the correct sys path using this command?:

django-admin.py startproject mysite.

 ImportError: Could not import settings 'mysite.settings' (Is it on sys.path?): No 
module named mysite.setting

I tried various things including trying to set the environmental variables differently. I finally installed Python-2.7.6, an upgrade from Python 2.7.3 I was using, to solved the problem. To get a working system on Windows 8 I used Python 2.7.6, Django 1.6, msql-installer-community-5.6.15.0, and MySQL-python-1.2.4b4.win32-py2.7. The trick is to find versions that work together. This can be done by trial and error since it is not always easy to find documentation that tells you. I tried to use the most recent stable releases of Django, Python, and MySQL.
 
To start the development server I attempted to run: 
 
 python manage.py runserver
 
I got:
 
  from django.core.exceptions import ImproperlyConfigured ... configured. " 
"Please supply the ENGINE value. Check ". "settings documentation for more details.")
 
This led me to believe that I needed to go back to the mysite.settings.py file. I 
double checked my settings but found nothing to correct this error. I remember 
reading something about setting the DJANGO_SETTINGS_MODULE in the Environment 
variables. I created a DJANGO_SETTINGS_MODULE variable in the environment system. I 
set it equal to C:/python_projects/mysite/mysite.settings.py. That didn't work but 
when I was in the outer mysite directory on the command line I used: 
 
set DJANGO_SETTINGS_MODULE= mysite.settings
 
and after that ran 
 
python manage.py runserver 
 
and had no problems after that continuing through the tutorial. 
 
 So once again I have run into compatibility problems with updates of software. Each 
release is a little different enough to cause problems. Users need to be aware of 
these conflicts that can occur so they have something else to try when they hit a 
brick wall in developing. 

Wednesday, December 18, 2013

It has been a long time since I have posted on this blog. I attended a OPW intern meeting as an alumnae on the irc today. It was suggested I continue blogging here especially since I am still working some with JBoss as an unpaid intern. I am still having trouble with rhabdomyolysis. Last spring and this fall I fell and broke bones and ended up in the rehab hospital. Since I can barely walk I am looking for a telecommuting job. Unfortunately most jobs want you on site. I really need a paying job since I have unpaid medical bills.

The Navigational problem I was working on was solved by some one else. I moved on to rpc (remote procedure call) since there were several issues in the tracker concerning rpc. First I needed to build a rpc application to test to get a better understanding of rpc. I tried to build a rpc app using the Reference Guide for Errai. I got rid of all of the errors in Eclipse but was getting a run time error. I didn't know what was wrong. Finally I asked my mentor. He said put the project on Github so he could look at it. He fixed the project but there were still 3 dependencies coming up as being errors. I asked my mentor about it. He looked at my error messages and suggested the central JBoss repository was down. If that was true then the repository had been down for over a week. I asked my mentor how to know what to put in the pom and web.xml files since he had made so many changes in them. He suggested I get a book on Maven and look at the section on servelets in the Java EE 6 tutorial. So besides learning CDI and GWT I have to also learn Maven and Java EE 6. When I set up my Maven project I used the settings described in the Reference Guide for Errai. I didn't know I had to change them since it wasn't mentioned in the Reference Guide. I just assume the settings for Maven were universal for Errai. I bought "Apache Maven Dependency Management" by Jonathan Lalou and "Maven 3.1 Step by Step" by Riyaz Eksambi inexpensively on my kindle. Both books were from 2013. I wish I had been able to look through the books before I bought them. While they had information for Maven dependencies for applications like Spring there was nothing specific for Errai. The Java EE 6 tutorial didn't have anything specific to Errai servelets either. I also need to figure out what goes in the properties files. If I understood Errai better I would write my own book for people.

Since I need a job I have started to learn Python in more detail. I had been exposed to Django and Python 4 years ago but didn't know much of them. I have gotten calls about telecommuting jobs using Python and Ruby which I don't know either. Learning Python and MySQL  that went with it was much easier than learning Errai. I am having some problem with creating a project with Django. I am wondering if it has something to do with Windows 8 I am using. When I upgraded to Windows 8 I had to update MySQL because it wasn't configuring. I am hesitant to update to Windows 8.1 and the development applications for MySQL, Python, and Django because I might lose all compatibility.. A friend suggested I switch to a virtual Linux system. For Ubuntu there is no installer for Windows 8. Updating software creates a huge headache. Java and Maven are being updated all the time. I then have to change environmental variables, remove old versions, and remember to reboot to install them if I want access to the current versions. After the last Java update I suddenly didn't have enough heap space to run the JVM. I had to create a _JAVA_OPTIONS systems environmental variable of -Xmx512M to create enough space.

As you can see I have learned a lot of stuff but not enough to solve the rpc tracking issues. I wonder if I should give it up for now and concentrate on Python so I can get something up on Github in Python so I can find a job.