1

Closed

Bad path?

description

It appears that there is a path hard coded into the app (for the import.txt file), something that should be set in the config file. I get the following error regardless of the settings in the DMOZ_importer.exe.config. The path 'H:\travail en cours\Perso\Henduoda\Tools\DMOZ\Import.txt' is fixed.
 
Ouch! an error : System.IO.DirectoryNotFoundException: Could not find a part of
the path 'H:\travail en cours\Perso\Henduoda\Tools\DMOZ\Import.txt'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I
nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o
ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share)
at System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding)
at Dmoz.Importer.DBHelper.Process(Uri pathToRDF)
at Dmoz.Importer.Program.Main()PRESS A KEY TO QUIT.
 
Is there a solution to this problem?
Closed Jun 16, 2008 at 6:57 AM by bodzebod
Closed.

comments

duckyaya wrote Nov 30, 2007 at 1:07 PM

I have also met this problem, maybe a little bug.
A small trick is that I made a directory just like the default parameter : 'H:\travail en cours\Perso\Henduoda\Tools\DMOZ\Import.txt'.
so without changing the DMOZ_Importer.exe.config file, hope this will help you.

bodzebod wrote Feb 11, 2008 at 1:06 PM

Hi all, thanks for using DMOZ Importer ! And sorry for my delay to reply.

Actually, I think you missed one setting. In the program configuration file (in source files, it's "app.config", and in binary package, it's "dmoz_importer.exe.config"), you may locate this section :

<DMOZ_Importer.Properties.Settings>
  <setting name="DMOZ_structure_path" serializeAs="String">
    <value>H:\travail en cours\Perso\Henduoda\Tools\DMOZ\structure.rdf</value>
  </setting>
  <setting name="DMOZ_content_path" serializeAs="String">
    <value>H:\travail en cours\Perso\Henduoda\Tools\DMOZ\content.rdf</value>
  </setting>
  <setting name="OutputPath" serializeAs="String">
    <value>H:\travail en cours\Perso\Henduoda\Tools\DMOZ</value>
  </setting>
  <setting name="BatchRowsNumber" serializeAs="String">
    <value>10000</value>
  </setting>
</DMOZ_Importer.Properties.Settings>
For each setting ("DMOZ_structure_path", "DMOZ_content_path" and "OutputPath"), you should adjust the right path. The 2 first settings are the paths to the DMOZ files, and the setting "OutputPath" is the path to the folder where the program can generate its intermediate "import.txt" file, so a place where the program is allowed to read and write.

Hope this will work for you ! /Stephane Baudet

wrote Feb 11, 2008 at 1:13 PM

dpie wrote Feb 21, 2008 at 12:57 PM

I modify the path at the configuration file but the problem has not been solved?
Any ideas?

pedrito68 wrote Mar 19, 2008 at 12:28 AM

There is, in fact, a problem with the program. I'm not sure why yet, but I had the same problem as the others who posted here.

This is the section from my DMOZ_Importer.exe.config:
<DMOZ_Importer.Properties.Settings>
  <setting name="DMOZ_structure_path" serializeAs="String">
    <value>C:\Software Development\DMOZ_Importer\structure.rdf</value>
  </setting>
  <setting name="DMOZ_content_path" serializeAs="String">
    <value>C:\Software Development\DMOZ_Importer\content.rdf</value>
  </setting>
  <setting name="OutputPath" serializeAs="String">
    <value>C:\Software Development\DMOZ_Importer\DMOZ</value>
  </setting>
  <setting name="BatchRowsNumber" serializeAs="String">
    <value>10000</value>
  </setting>
</DMOZ_Importer.Properties.Settings>
But when I run it under the debugger, in DBHelper.Process(), for the line:

String FullOutputPath = Settings.Default.OutputPath;

FullOutputPath = "H:\travail en cours\Perso\Henduoda\Tools\DMOZ"

I couldn't figure out how to get it to read the settings from the exe.config. It's clearly getting the values from the settings.settings file.

I ended up hardcoding the values in the code...

wrote Jun 16, 2008 at 6:57 AM

herculesthemad wrote Sep 26, 2008 at 12:49 PM

i have the same problem too.
it maybe has a litlle bug.

how can i open the source?? i have a problem with the temporery keys????>?

wrote Feb 12, 2013 at 9:34 PM

wrote May 16, 2013 at 2:11 AM