WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 12-06-2017, 07:48 AM
Vishav Vishav is offline
Member
 
Join Date: Jun 2017
Posts: 57
Same error is coming with code suggested by you.

I will explain it
I have one file called Parent in which i created file experiment_data having write mode using code.

os.chdir(r'D:\PhD\Study-I_Part_I\My_Programs\DFI\Participant_Data')
experiment_data = open(str(id) + '_experiment_data.txt','w')
data = " Participant ID: %s\tParticipant Name: %s\tAge: %s\tGender: %s\n\n" % (id,Name,Age,gender)
experiment_data.write(data)

After that i made a child code to which i passed id variable value to child using code
id=id
myVars = {'id':id}
exec(open('DFI_Snacks.py').read(), myVars)

Then I open experiment_data file in child code matching with id value in append mode using code

os.chdir(r'D:\PhD\Study-I_Part_I\My_Programs\DFI\Participant_Data')
filename=str(id) +'_experiment_data.txt'
experiment_data = open(filename,'a')

This error is coming when Parent code import child code. I don't know where i am going wrong.
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
.wrl File in Vizard Hitesh Vizard 2 07-02-2015 10:43 AM
Converting .blend file in .osgb or any vizard supported file Hitesh Vizard 0 07-02-2015 02:31 AM
Vizard .exe file doesn't load (Vizard 3) Saule Vizard 4 02-05-2014 07:01 AM
Interaction of vizard objects with an imported obj file sunil.nair Vizard 2 10-09-2013 03:08 PM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 12:13 PM


All times are GMT -7. The time now is 09:09 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC