"NS_ERROR_FILE_UNRECOGNIZED_PATH" Error with '!DATASOURCE' Command

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Jxnderson
Posts: 12
Joined: Tue Apr 11, 2023 12:05 am

"NS_ERROR_FILE_UNRECOGNIZED_PATH" Error with '!DATASOURCE' Command

Post by Jxnderson » Tue Apr 11, 2023 12:14 am

FCI: (Added by Mod)

Code: Select all

iMacros for FF v8.9.7, FF48, OS=Win7/10/11?
Recently I got access to a code that automates a "hunt" in an online rpg I play. however, it is returning me the error:

Code: Select all

NS_ERROR_FILE_UNRECOGNIZED_PATH: Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsILocalFile.initWithPath], line 10 (Error code: -1001)

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 50

SET !DATASOURCE C:\Users\Janderson\Documents\iMacros\Datasources\namePC.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
SET !VAR1 {{!COL1}}

SET !DATASOURCE {{!VAR1}}\Datasources\data_lnw_to_lnw_AS\productsInwshop\shop2.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
this is line 10

Code: Select all

SET !DATASOURCE {{!VAR1}}\Datasources\data_lnw_to_lnw_AS\productsInwshop\shop2.csv
I don't know if there is a problem, but I don't have this file that is in the path.
Whoever passed it to me said that he never needed to use or configure something in that location.
Last edited by chivracq on Wed Apr 12, 2023 4:19 am, edited 4 times in total.
Reason: FCI added to OP from some later Post in the Thread...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: "NS_ERROR_FILE_UNRECOGNIZED_PATH" Error with '!DATASOURCE' Command

Post by chivracq » Tue Apr 11, 2023 7:24 am

Jxnderson wrote:
Tue Apr 11, 2023 12:14 am
Recently I got access to a code that automates a "hunt" in an online rpg I play. however, it is returning me the error:

Code: Select all

NS_ERROR_FILE_UNRECOGNIZED_PATH: Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsILocalFile.initWithPath], line 10 (Error code: -1001)

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 50

SET !DATASOURCE C:\Users\Janderson\Documents\iMacros\Datasources\namePC.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
SET !VAR1 {{!COL1}}

SET !DATASOURCE {{!VAR1}}\Datasources\data_lnw_to_lnw_AS\productsInwshop\shop2.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
this is line 10

Code: Select all

SET !DATASOURCE {{!VAR1}}\Datasources\data_lnw_to_lnw_AS\productsInwshop\shop2.csv
I don't know if there is a problem, but I don't have this file that is in the path.
Whoever passed it to me said that he never needed to use or configure something in that location.

:!: I've edited your Thread Title into a descriptive Title, "help me with this code" is completely useless on a Tech Forum...

The Thread has probably nothing "really" specific to the 'iMacros for FF' Sub-Forum, even if that "NS_ERROR_FILE_UNRECOGNIZED_PATH" Error is a specific Error returned (only I think) by the FF Browser, but the Behaviour would be the same with any other Browser(s) with a similar Error, I'll possibly move the Thread to the 'General' Sub-Forum, ... but I leave it in the 'iMacros for FF' one "for the moment"... :|

>>>

FCIM...! :mrgreen: (Read my Sig, ... and the Forum Rules... :idea: )

v8.9.7 for FF is visible from your Script, but if you copied this Script from some other User, that doesn't mean necessarily that you are also using the same Version, and the "rest" of your FCI is still missing anyway... Always a "good idea" anyway to read the Forum Rules when you join a Tech Forum... :wink:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Jxnderson
Posts: 12
Joined: Tue Apr 11, 2023 12:05 am

Re: "NS_ERROR_FILE_UNRECOGNIZED_PATH" Error with '!DATASOURCE' Command

Post by Jxnderson » Tue Apr 11, 2023 6:01 pm

Sorry, I'm new and I have to use google translate, so it's a little more confusing than usual for me, since I'm not used to using forums. I'll take a look at the rules.

I am using the correct version of Firefox, the version that worked before my colleague switched computers. He gave me the "correct" version of Mozilla Firefox which would be 48.0.2.
It also gave me the correct version of Imacros 8.9.7

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 50

SET !DATASOURCE C:\Users\Janderson\Documents\iMacros\Datasources\namePC.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
SET !VAR1 {{!COL1}}

SET !DATASOURCE {{!VAR1}}\Datasources\data_lnw_to_lnw_AS\productsInwshop\shop2.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}

URL GOTO=http://www.narutoplayers.com.br/np2/?p=cacadas
TAG POS=2 TYPE=SELECT ATTR=ID:server CONTENT=%1
TAG POS=1 TYPE=SELECT ATTR=ID:por_nivel CONTENT=%1
TAG POS=2 TYPE=INPUT:SUBMIT ATTR=ID:confirmar
WAIT SECONDS=1

SET !EXTRACT_TEST_POPUP NO
TAB T=1
TAB CLOSEALLOTHERS

SET API (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)

FILEDELETE NAME=C:\Captcha\nP.png
ONDOWNLOAD FOLDER=C:\Captcha FILE=nP.png5
WAIT SECONDS=5
TAG POS=1 TYPE=IMG ATTR=ID:img_captcha CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT
WAIT SECONDS=5

TAB OPEN
TAB T=2
URL GOTO=http://imacros2.2captcha.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:getcapcha.php ATTR=NAME:key CONTENT=6B2H6G5FFFF6YYH58434RAEMNTR
TAG POS=1 TYPE=INPUT:FILE FORM=ACTION:getcapcha.php ATTR=NAME:file CONTENT=C:\Captcha\nP.png
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ACTION:getcapcha.php ATTR=NAME:regsense CONTENT=YES
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:getcapcha.php ATTR=*
WAIT SECONDS=5
SET !EXTRACT NULL
TAG POS=1 TYPE=* ATTR=TXT:* EXTRACT=TXT
WAIT SECONDS=5
TAB CLOSE
TAB T=5

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:codigo CONTENT=!EXTRACT
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form ATTR=ID:confirmar
WAIT SECONDS=400
here is the complete code.
Last edited by chivracq on Wed Apr 12, 2023 4:12 am, edited 1 time in total.
Reason: Several Layers of Quoting removed, not needed... (For Readability...)
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: "NS_ERROR_FILE_UNRECOGNIZED_PATH" Error with '!DATASOURCE' Command

Post by chivracq » Wed Apr 12, 2023 4:10 am

Jxnderson wrote:
Tue Apr 11, 2023 6:01 pm
Sorry, I'm new and I have to use google translate, so it's a little more confusing than usual for me, since I'm not used to using forums. I'll take a look at the rules.

I am using the correct version of Firefox, the version that worked before my colleague switched computers. He gave me the "correct" version of Mozilla Firefox which would be 48.0.2.
It also gave me the correct version of Imacros 8.9.7

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 50

SET !DATASOURCE C:\Users\Janderson\Documents\iMacros\Datasources\namePC.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
SET !VAR1 {{!COL1}}

SET !DATASOURCE {{!VAR1}}\Datasources\data_lnw_to_lnw_AS\productsInwshop\shop2.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}

URL GOTO=http://www.narutoplayers.com.br/np2/?p=cacadas
TAG POS=2 TYPE=SELECT ATTR=ID:server CONTENT=%1
TAG POS=1 TYPE=SELECT ATTR=ID:por_nivel CONTENT=%1
TAG POS=2 TYPE=INPUT:SUBMIT ATTR=ID:confirmar
WAIT SECONDS=1

SET !EXTRACT_TEST_POPUP NO
TAB T=1
TAB CLOSEALLOTHERS

SET API (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)

FILEDELETE NAME=C:\Captcha\nP.png
ONDOWNLOAD FOLDER=C:\Captcha FILE=nP.png5
WAIT SECONDS=5
TAG POS=1 TYPE=IMG ATTR=ID:img_captcha CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT
WAIT SECONDS=5

TAB OPEN
TAB T=2
URL GOTO=http://imacros2.2captcha.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:getcapcha.php ATTR=NAME:key CONTENT=6B2H6G5FFFF6YYH58434RAEMNTR
TAG POS=1 TYPE=INPUT:FILE FORM=ACTION:getcapcha.php ATTR=NAME:file CONTENT=C:\Captcha\nP.png
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ACTION:getcapcha.php ATTR=NAME:regsense CONTENT=YES
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:getcapcha.php ATTR=*
WAIT SECONDS=5
SET !EXTRACT NULL
TAG POS=1 TYPE=* ATTR=TXT:* EXTRACT=TXT
WAIT SECONDS=5
TAB CLOSE
TAB T=5

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:codigo CONTENT=!EXTRACT
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form ATTR=ID:confirmar
WAIT SECONDS=400
here is the complete code.

"I am using the correct version of Firefox, the version that worked before my colleague switched computers. He gave me the "correct" version of Mozilla Firefox which would be 48.0.2.
It also gave me the correct version of Imacros 8.9.7
"
=> A bit unclear "verbiage" but I understand that you are using:
FCI:

Code: Select all

iMacros for FF v8.9.7, FF48, OS=Win7/10/11?
Well, the "easy" Solution if you are using v8.9.7 for FF and simply want your Script to keep running without being bothered by Errors is to use `!ERRORIGNORE` (at the beginning of your Script, or just before where you "expect" some Runtime Error aborting your Script...) :idea:

But hum, your Script looks a bit "strange" anyway, you "nearly never"(*) need to use/call 2 DataSources in a same Script, simply remove the Code Block about the 2nd one, especially if that "shop2.csv" File doesn't exist on your System, and you don't do anything with it obviously...! Problem solved, I would think...! :idea:

(*) "nearly never" => Well..., can be some Advanced Technique in specific Cases, (notably if you want a Script to "communicate" with itself between Loops or different Runs, or 2 Scripts to communicate (= exchange Vars) between them), but if you are new to iMacros, I don't think you'll need that Func (yet)... :wink:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Jxnderson
Posts: 12
Joined: Tue Apr 11, 2023 12:05 am

Re: "NS_ERROR_FILE_UNRECOGNIZED_PATH" Error with '!DATASOURCE' Command

Post by Jxnderson » Fri Apr 14, 2023 7:29 pm

chivracq wrote:
Wed Apr 12, 2023 4:10 am
Jxnderson wrote:
Tue Apr 11, 2023 6:01 pm
Sorry, I'm new and I have to use google translate, so it's a little more confusing than usual for me, since I'm not used to using forums. I'll take a look at the rules.

I am using the correct version of Firefox, the version that worked before my colleague switched computers. He gave me the "correct" version of Mozilla Firefox which would be 48.0.2.
It also gave me the correct version of Imacros 8.9.7

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 50

SET !DATASOURCE C:\Users\Janderson\Documents\iMacros\Datasources\namePC.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
SET !VAR1 {{!COL1}}

SET !DATASOURCE {{!VAR1}}\Datasources\data_lnw_to_lnw_AS\productsInwshop\shop2.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}

URL GOTO=http://www.narutoplayers.com.br/np2/?p=cacadas
TAG POS=2 TYPE=SELECT ATTR=ID:server CONTENT=%1
TAG POS=1 TYPE=SELECT ATTR=ID:por_nivel CONTENT=%1
TAG POS=2 TYPE=INPUT:SUBMIT ATTR=ID:confirmar
WAIT SECONDS=1

SET !EXTRACT_TEST_POPUP NO
TAB T=1
TAB CLOSEALLOTHERS

SET API (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)

FILEDELETE NAME=C:\Captcha\nP.png
ONDOWNLOAD FOLDER=C:\Captcha FILE=nP.png5
WAIT SECONDS=5
TAG POS=1 TYPE=IMG ATTR=ID:img_captcha CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT
WAIT SECONDS=5

TAB OPEN
TAB T=2
URL GOTO=http://imacros2.2captcha.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:getcapcha.php ATTR=NAME:key CONTENT=6B2H6G5FFFF6YYH58434RAEMNTR
TAG POS=1 TYPE=INPUT:FILE FORM=ACTION:getcapcha.php ATTR=NAME:file CONTENT=C:\Captcha\nP.png
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ACTION:getcapcha.php ATTR=NAME:regsense CONTENT=YES
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:getcapcha.php ATTR=*
WAIT SECONDS=5
SET !EXTRACT NULL
TAG POS=1 TYPE=* ATTR=TXT:* EXTRACT=TXT
WAIT SECONDS=5
TAB CLOSE
TAB T=5

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:codigo CONTENT=!EXTRACT
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form ATTR=ID:confirmar
WAIT SECONDS=400
here is the complete code.

"I am using the correct version of Firefox, the version that worked before my colleague switched computers. He gave me the "correct" version of Mozilla Firefox which would be 48.0.2.
It also gave me the correct version of Imacros 8.9.7
"
=> A bit unclear "verbiage" but I understand that you are using:
FCI:

Code: Select all

iMacros for FF v8.9.7, FF48, OS=Win7/10/11?
Well, the "easy" Solution if you are using v8.9.7 for FF and simply want your Script to keep running without being bothered by Errors is to use `!ERRORIGNORE` (at the beginning of your Script, or just before where you "expect" some Runtime Error aborting your Script...) :idea:

But hum, your Script looks a bit "strange" anyway, you "nearly never"(*) need to use/call 2 DataSources in a same Script, simply remove the Code Block about the 2nd one, especially if that "shop2.csv" File doesn't exist on your System, and you don't do anything with it obviously...! Problem solved, I would think...! :idea:

(*) "nearly never" => Well..., can be some Advanced Technique in specific Cases, (notably if you want a Script to "communicate" with itself between Loops or different Runs, or 2 Scripts to communicate (= exchange Vars) between them), but if you are new to iMacros, I don't think you'll need that Func (yet)... :wink:
Apparently it worked when I deleted the second DATASOURCE. But I still want to find out what it's for. I'm still doing some tests.

I have another doubt, could you help me?
I need to open a new URL, but I would have to paste an ID that was generated in the previous process in a specific part of the link (which would be at the end)
Exemple

Code: Select all

https://rucaptcha.com/res.php?key=1abc234de56fab7c89012d34e56fa7b8&action=get&id=51695794051
this id="51695794051" would be the code that would have to be pasted at the end of the link. is there any code to do this? Remembering that at each loop, this code is different.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: "NS_ERROR_FILE_UNRECOGNIZED_PATH" Error with '!DATASOURCE' Command

Post by chivracq » Sat Apr 15, 2023 3:31 am

Jxnderson wrote:
Fri Apr 14, 2023 7:29 pm
Apparently it worked when I deleted the second DATASOURCE. But I still want to find out what it's for. I'm still doing some tests.

Yep OK, like I "expected"... :P

>>>
Jxnderson wrote:
Fri Apr 14, 2023 7:29 pm
I have another doubt, could you help me?
I need to open a new URL, but I would have to paste an ID that was generated in the previous process in a specific part of the link (which would be at the end)
Exemple

Code: Select all

https://rucaptcha.com/res.php?key=1abc234de56fab7c89012d34e56fa7b8&action=get&id=51695794051
this id="51695794051" would be the code that would have to be pasted at the end of the link. is there any code to do this? Remembering that at each loop, this code is different.

Hum, open a New Thread for that I would think, this has nothing to do anymore with "a DataSource not being found", => in the 'General' Sub-Forum, I would think..., or Captcha related Threads usually involve the 'EXTRACT' Mechanism or saving a File locally, then the 'Data-Extraction' Sub-Forum might be more suited... (But no big deal, I can easily move Threads between Sub-Forums, if needed...)

And hum, I probably won't try to answer it myself, I don't help with Captcha's, nor with Games "normally" either, I answered this one Thread because the Scenario was "generic" enough, and not specific to Games or Captchas... :P

Put as much Quality and Info as you can in your New Thread, one of the "Best" Answerers on the Forum (same Level like me) is an Anti-Captcha Provider (@thecoder2012, for "9kw" ), if you provide absolutely all Info, you might get an Answer... :idea:
(He's "the Best" for Anti-Captcha + iMacros..., and he sometimes also answers Threads related to "other" Anti-Captcha Services..., as most have very poor Support/Understanding of iMacros... :| )
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Jxnderson
Posts: 12
Joined: Tue Apr 11, 2023 12:05 am

Re: "NS_ERROR_FILE_UNRECOGNIZED_PATH" Error with '!DATASOURCE' Command

Post by Jxnderson » Sat Apr 15, 2023 4:22 am

OK. Thank you for your support and for guiding me here! thank you very much! I'll close the topic and create another one with the new question.

@edit: actually i don't know how to close it xD
Post Reply