Cannot create path for resource file

Hi! I’ve been searching for an answer, but all I got were old bug-related posts.

I need to play a video (MPEG-4), so I am calling
[lua]media.playVideo(“vid/mpeg-4-5sec.mpg”, true, videoEnded)[/lua]

There is an error that’s driving me crazy:

WARNING: Cannot create path for resource file 'vid/mpeg-4-5sec.mpg'. File does not exist.

WARNING: Could not load video from path (vid/mpeg-4-5sec.mpg)

This happens even though the file is there, or even if I try to open a file in the project’s root directory. I’ve also tried this:
[lua]local path = system.pathForFile(“vid/mpeg-4-5sec.mpg”)
print(tostring(path))[/lua]
but I get nil.

Can someone enlighten me? [import]uid: 94362 topic_id: 18414 reply_id: 318414[/import]

One thing bothers me: I have no problem at all with images!

For example, I select a random image from a list:
[lua]local menuImages = {
“img/menu/discobolus.png”,
“img/menu/boxer.png”,
“img/menu/pontifex.png”
}

local image = display.newImage(menuImages[math.random(table.getn(menuImages))], true)[/lua]

It works like a charm… that is weird, or isn’t? [import]uid: 94362 topic_id: 18414 reply_id: 70629[/import]

I actually cannot replicate this error when using the correct file name and extension.

Are you absolutely certain of the video file’s name and your code both being identical?

Is this something you could upload and provide a link to?

If not but you are certain your code is fine you can file a bug report here; http://developer.anscamobile.com/content/bug-submission

Peach :slight_smile: [import]uid: 52491 topic_id: 18414 reply_id: 70744[/import]

Hi Peach,

I couldn’t make the program work, moreover, the Simulator crashed without any reason (which never did before).

What solved the problem was simple: do a “repair disk” and “repair permissions”, with a complete shutdown of the system (I didn’t try a simple restart, though).

Now, I can’t believe it does, it works.
Thanks & Cheers! [import]uid: 94362 topic_id: 18414 reply_id: 70795[/import]

Hey again,

Thanks for letting me know - I haven’t heard of anyone having to take those steps before and wonder if a simple restart would have worked. I’d like to think so. (Although I’ve only heard of a user having to restart to fix and issue once and I believe this may have been on a Windows machine.)

Either way I’m happy to hear it is resolved now and I thank you again for posting an update.

Peach :slight_smile: [import]uid: 52491 topic_id: 18414 reply_id: 70806[/import]

I have the same problem with Level Helper files not being found.

I have physically checked the root folder. The files are there.

Been struggling for eight hours. So I have already tried every reasonable trick and some unreasonable ones just to be sure.

I checked the temp folder that the simulator creates. It’s empty
WARNING: Cannot create path for resource file ‘level1.plhs’. File does not exist.

LEVELHELPER ERROR: Level file not found. [import]uid: 1908 topic_id: 18414 reply_id: 72825[/import]

Digifilm have you done as suggested above and repaired and possibly rebooted?

Is the issue present when you are not using LevelHelper?

Peach :slight_smile: [import]uid: 52491 topic_id: 18414 reply_id: 72859[/import]

Sorry. It’s a levelhelper api issue. Thanks anyways. [import]uid: 1908 topic_id: 18414 reply_id: 72948[/import]

Thankfully I found this!

Been having the same problem for a day, followed the advice of the above but still not working.

Has anyone else still had this problem and managed to work out a permanent fix yet? [import]uid: 41429 topic_id: 18414 reply_id: 96080[/import]

Is this problem had been solved?i was having this issue 2 months ago to the point i gave up on Levelhelper!i came back to it few days ago thinking it could have been that i just didn’t get it still no improvement.Could it a problem with corona build(as a tester i am still running the 2011.704 version)?Desperately need an answer. [import]uid: 21988 topic_id: 18414 reply_id: 103203[/import]

Hey multimarty, you need to contact LevelHelper support about this as it is not a Corona issue. (704 works fine, it is what I used for testing this originally.) [import]uid: 52491 topic_id: 18414 reply_id: 103247[/import]

multimarty, I managed to get this working.

I really should have posted a reply but, as Peach said, wasn’t really a Corona issue and it was answered on the LevelHelper forum, however…

What fixed it for me was using version 3 Corona code rather than the latest version.

To change it to version 3, goto:

File --> Download Updated Code
Select Corona and install version 3.

Regenerate the code for your program and that should work fine.

Hope that helps. [import]uid: 41429 topic_id: 18414 reply_id: 103253[/import]

@jason8 i’ll try your solution and probably try levelhelper on a regular mac(my snow leopard+ Vm workstation might be playing some trick too) and let you know.
@peach thanks for the advise i’ll contact him if my next test fail! [import]uid: 21988 topic_id: 18414 reply_id: 103446[/import]

@multimarty - no worries. For the record I don’t mean you can’t try to get advice here, you certainly can if other devs know how to assist (as jason seems to, kudos to you!) but yeah, we cannot provide any official support for third party tools.

Anyway good luck, I hope your test doesn’t fail :slight_smile: [import]uid: 52491 topic_id: 18414 reply_id: 103476[/import]