issues installing voter files
everything is working beautifully, until i try to run the import.pl script and then i get this error:
Can't locate Text/CSV_XS.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at import.pl line 5.
BEGIN failed--compilation aborted at import.pl line 5.
any ideas?
Try saying that with more or less context.
Wed Sep 5 06:45:10 2007
Are all odds that the date parse module will need to be installed also?
But I don't have it.
sakazilo7 is a spam-bot
I cannot believe I just spent ten minutes writing a careful reply to a spam-bot! It did ask a plausible question though!
See above - third option
Actually, both these modules are installed on the large majority of hosts who provide shell and perl access. When you shop for hosts, you would be wise to include these among your requirements.
I assume you have determined that Date::Parse is not installed on your host, and cannot be installed for you by your hosting service. In that case, you can follow the directions in the "third option"...
Date::Parse can be obtained from cpan.org at http://search.cpan.org/~gbarr/TimeDate-1.16/lib/Date/Parse.pm
A third option, if your service provider is not willing to install the module(s) and you do not have super user (root) access, is to compile (make) the module and place the compiled *.pm file into a location that you have access to, e.g. ~/perllib. Then add a line in import.pl above the "use ..." lines (above line 3) to add this location to the perl library search path, e.g.
use lib '/the/path/to/your/account/perllib/';
(substitute the absolute path to the folder you created)
wow, thanks! i am running
wow, thanks!
i am running advokit on my own web server, so i have super user privilages. i'll let you know how it goes!
new error
ok well all of that went fine but now i get a new error. do i need to create another mySQL database?
here is the error:
DBD::mysql::st execute failed: Table 'advokit.omrespolis' doesn't exist at import.pl line 3688,
DBD::mysql::st execute failed: Table 'advokit.omrespolis' doesn't exist at import.pl line 3688,
om_ is the prefix that i am
om_ is the prefix that i am using for the tables, here is my advokit database table list:
+-------------------------+
| Tables_in_advokit |
+-------------------------+
| om_answer |
| om_attachment |
| om_campaign |
| om_cat |
| om_citizenship |
| om_contactlist |
| om_contactresult |
| om_county |
| om_customfield |
| om_customfieldsettings |
| om_customfieldvalue |
| om_department |
| om_displayhelp |
| om_filter |
| om_followup |
| om_followupdetail |
| om_goal |
| om_help |
| om_image |
| om_imtype |
| om_job |
| om_language |
| om_mailaddress |
| om_operation |
| om_person |
| om_personlanguage |
| om_personsection |
| om_personteamjob |
| om_preferences |
| om_priority |
| om_qcat |
| om_question |
| om_questionnaire |
| om_questionnairesection |
| om_residence |
| om_respolis |
| om_script |
| om_secretquestion |
| om_section |
| om_sectionaction |
| om_sectiondisplay |
| om_sectionquestion |
| om_settings |
| om_source |
| om_state |
| om_streettype |
| om_task |
| om_team |
| om_teamjob |
| om_ustate |
| om_ver |
| om_voter |
| om_voteranswer |
| om_votercampaign |
| om_votercustom |
| om_votercustomfield |
| om_voterlanguage |
| om_voterquestionnaire |
| om_votersource |
| om_voterteamjob |
+-------------------------+
60 rows in set (0.00 sec)
well i fixed it. there was
well i fixed it. there was an error in my import.pl file, line 25 looked like this:
my $CFG_DBPREFIX = 'om';
when in reality it should have looked like this:
my $CFG_DBPREFIX = 'om_';
hehe, user error. now i feel stupid.
Glad you figured it out
I was going to ask what you had for $CFG_DBPREFIX...

The Text/CSV_XS perl module needs to be installed
(Odds are that the Date::Parse module will need to be installed also!)
Text::CSV_XS can be obtained from cpan.org at: http://search.cpan.org/~jwied/Text-CSV_XS-0.23/CSV_XS.pm
Date::Parse can be obtained from cpan.org at http://search.cpan.org/~gbarr/TimeDate-1.16/lib/Date/Parse.pm
Ask your ISP to install these modules for you. If you have super user access on your server, follow the instructions in the README file to compile and install the module.
A third option, if your service provider is not willing to install the module(s) and you do not have super user (root) access, is to compile (make) the module and place the compiled *.pm file into a location that you have access to, e.g. ~/perllib. Then add a line in import.pl above the "use ..." lines (above line 3) to add this location to the perl library search path, e.g.
(substitute the absolute path to the folder you created)
Normal installation steps:
gunzip < {the package name}.tar.gz | tar xvf -
(this verifies that the module works)
(if you don't see "third option" above)