Getcwd Io Error
df -h Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 7.7G 4.9G 2.7G 64% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% mount i/o error solaris 10 /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 39G 1.2M 39G 1% /etc/svc/volatile how to check i/o error in solaris objfs 0K 0K 0K 0% /system/object /platform/SUNW,Sun-Fire-T200/lib/libc_psr/libc_psr_hwcap1.so.1 7.7G 4.9G 2.7G 64% /platform/sun4v/lib/libc_psr.so.1 /platform/SUNW,Sun-Fire-T200/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1 7.7G 4.9G 2.7G 64% /platform/sun4v/lib/sparcv9/libc_psr.so.1 fd df cannot statvfs permission denied 0K 0K 0K 0% /dev/fd /dev/md/dsk/d50 15G 2.2G 13G 15% /var swap 2.0G 2.2M 2.0G 1% /tmp df: cannot statvfs /var/run: I/O error /dev/md/dsk/d140 11G 8.9G 2.0G 82% /sites /dev/md/dsk/d60 7.7G 2.7G 4.9G 37% /opt /dev/md/dsk/d90 963M 1.0M 904M 1% /logs /dev/md/dsk/d85 963M 3.3M 902M 1% /home /dev/md/dsk/d110 963M 730M 175M 81% /u01 df: cannot statvfs /var/mqm: I/O error df: cannot statvfs /var/crash: I/O error I was able to enter the directory /var but I was not able to list anything. root@solaris:~ # cd /var cd: error retrieving current directory: getcwd: cannot access parent directories: I/O error root@solaris:/var # ls -al .: I/O error On the console I was seeing the error from makeutx Jul 22 21:53:41 svc.startd[9669]: makeutx failed, retrying: I/O error Jul 22 21:53:42 svc.startd[9669]: makeutx failed, retrying: No such file or directory I decided to umount the filesystem and mount it again and my error disappeared root@solaris:/root # umount /var root@solaris:/root # df -h /var Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 7.7G 4.9G 2.7G 64% / root@solaris:/root # mount /var root@solaris:/root # df -h /var Filesystem size used avail capacity Mounted on /dev/md/dsk/d50 15G 2.2G 13G 15% /var Share this:EmailTwitterGoogleFacebookRedditPrintLike this:Like Loading... Related Posted in: Solaris | Tagged: getcwd, ioerror, makeutx, statvfs Post navigation ← Older Newer → Search this site Search Author Emerson TakahashiTop Posts & Pages Connecting to HP iLO using the command line Discover HP iLO IP address in Linux Remove virbr0 interface in Linux How to install compiled programs on a Synology NAS Running fsck and automatically fix any errors encountered Categories AIX ALOM Android ARCserve CA Chrome Countries EMC Enterprises Firefox Games Hardware HMC Hosting HP iLO HP Server Automation HP-UX HPOM Informix J
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up help with IOError for reading files up vote 2 down vote favorite for subdir, dirs, files https://setaoffice.com/2010/07/23/filesystem-mounted-but-showing-io-error/ in os.walk(crawlFolder): for file in files: print os.getcwd() f=open(file,'r') lines=f.readlines() writeFile.write(lines) f.close() writeFile.close() I get the error as:- IOError: [Errno 2] No such file or directory In reference to my partial python code above:- print os.getcwd() --> C:\search engine\taxonomy however, the file is located in the directory "C:\search engine\taxonomy\testFolder" I know the error is because it works in the current directory and I need to append the directory testFolder with file https://stackoverflow.com/questions/3392152/help-with-ioerror-for-reading-files somehow. Could someone please correct my code and help me out with this? Thank you. python file directory ioerror share|improve this question asked Aug 2 '10 at 22:02 leba-lev 96562037 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted The subdir variable gives you the path from crawlFolder to the directory containing file, so you just need to pass os.path.join(crawlFolder, subdir, file) to open instead of a bare file. Like so: for subdir, dirs, files in os.walk(crawlFolder): for file in files: print os.getcwd() f=open(os.path.join(crawlFolder, subdir, file),'r') lines=f.readlines() writeFile.write(lines) f.close() writeFile.close() Incidentally, this is a more efficient way to copy a file into another file: for subdir, dirs, files in os.walk(crawlFolder): for file in files: print os.getcwd() f=open(os.path.join(crawlFolder, subdir, file),'r') writeFile.writelines(f) f.close() writeFile.close() [EDIT: Can't resist the temptation to play golf: for subdir, dirs, files in os.walk(crawlFolder): for file in files: writeFile.writelines(open(os.path.join(crawlFolder, subdir, file))) writeFile.close() ] share|improve this answer edited Aug 2 '10 at 23:20 answered Aug 2 '10 at 22:07 zwol 68.6k20116199 +1: os.path.join. –S.Lott Aug 2 '10 at 22:27 Thank you for your help. –leba-lev Aug 2 '10 at 22:38 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Si
Sign in Pricing Blog https://github.com/jekyll/jekyll/issues/2240 Support Search GitHub This repository Watch 1,312 Star 27,239 Fork 6,005 jekyll/jekyll Code Issues 84 Pull requests 39 Projects 0 Wiki Pulse Graphs New issue 'Too many open files - getcwd' Error on 'jekyll serve' #2240 Closed blundin i/o error opened this Issue Apr 17, 2014 · 13 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 5 participants blundin commented Apr 17, 2014 I just installed the alpha 3 release, and getcwd io error I get the following error on running the jekyll serve command: Configuration file: /Users/brian/Documents/code-blog/_config.yml Source: /Users/brian/Documents/code-blog Destination: /Users/brian/Documents/code-blog/_site Generating... jekyll 2.0.0.alpha.3 | Error: Too many open files - getcwd After uninstalling it and reinstalling alpha 2, the error went away. Jekyll member parkr commented Apr 17, 2014 Can you re-run this with --trace and show us the full output? blundin commented Apr 18, 2014 You got it: Configuration file: /Users/brian/Documents/code-blog/_config.yml Source: /Users/brian/Documents/code-blog Destination: /Users/brian/Documents/code-blog/_site Generating... /Users/brian/.rvm/gems/ruby-2.1.1@jekyll/gems/jekyll-2.0.0.alpha.3/lib/jekyll/site.rb:126:in 'chdir': Too many open files - getcwd (Errno::EMFILE) from /Users/brian/.rvm/gems/ruby-2.1.1@jekyll/gems/jekyll-2.0.0.alpha.3/lib/jekyll/site.rb:126:in 'read_directories' from /Users/brian/.rvm/gems/ruby-2.1.1@jekyll/gems/jekyll-2.0.0.alpha.3/lib/jekyll/site.rb:137:in 'block in read_directories' from /Users/brian/.rvm/gems/ruby-2.1.1@jekyll/gems/jekyll-2.0.0.alpha.3/lib/jekyll/site.rb:133:in 'each' from /Users/brian/.rvm/gems/ruby-2.1.1@jekyll/gems/jekyll-2.0.0.alpha.3/lib/jekyll/site.rb:133:in 'read_directories' from /Users/brian/.rvm/gems/ruby-2.1.1@jekyll/gems/jekyll-2.0.0.alpha.3/lib/jekyll/site.rb:137:in 'block in read_directories' from /Users/brian/.rvm/gems/ruby-2.1.1@jekyll/gems/jekyll-2.0.0.alpha.3/lib/jekyll/site.rb:133:in 'each' from /Users/brian/.rvm/gems/ruby-2.1.1@jekyll/gems/jekyll-2.0.0.alpha.3/lib/jekyll/site.rb:133:in 'read_directories' from /Users/brian/.rvm/gems/ruby-2.1.1@jekyll/gems/jekyll-2.0.0.alpha.3/lib/jekyll/site.rb:137:in 'block in read_directories' from /Users/brian/.rvm/gems/ruby-2.1.1@jekyll/gems/jekyll-2.0.0.alpha.3/lib/jekyll/site.rb: