Skip to content

File Not found error #183

@YogishGayatri

Description

@YogishGayatri

Hi code2vec team,
I tried to preprocess the small java data set , i also updated the path for test, train and validation, if there are no subdirectories then c2v files for the same is being generated and works fine but if there are subdirectories under the train, test or validation files following error is thrown

"
Extracting paths from validation set...
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Users\yhi6\AppData\Local\Programs\Python\Python310\lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "C:\Users\yhi6\AppData\Local\Programs\Python\Python310\lib\multiprocessing\pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "D:\VSCODE\CODETOVEC\code2vec\JavaExtractor\extract.py", line 21, in ParallelExtractDir
ExtractFeaturesForDir(args,tmpdir, dir_, "")
File "D:\VSCODE\CODETOVEC\code2vec\JavaExtractor\extract.py", line 33, in ExtractFeaturesForDir
with open(outputFileName, 'a') as outputFile:
FileNotFoundError: [Errno 2] No such file or directory: './tmp/feature_extractor10488/java-small\validation\libgdx'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\VSCODE\CODETOVEC\code2vec\JavaExtractor\extract.py", line 92, in
ExtractFeaturesForDirsList(args, to_extract)
File "D:\VSCODE\CODETOVEC\code2vec\JavaExtractor\extract.py", line 63, in ExtractFeaturesForDirsList
p.starmap(ParallelExtractDir, zip(itertools.repeat(args),itertools.repeat(tmp_dir), dirs))
File "C:\Users\yhi6\AppData\Local\Programs\Python\Python310\lib\multiprocessing\pool.py", line 372, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
File "C:\Users\yhi6\AppData\Local\Programs\Python\Python310\lib\multiprocessing\pool.py", line 771, in get
raise self._value
FileNotFoundError: [Errno 2] No such file or directory: './tmp/feature_extractor10488/java-small\validation\libgdx'
Finished extracting paths from validation set
Extracting paths from test set...
multiprocessing.pool.RemoteTraceback:
"

I suspect that this error might have been created because of wrong path generation as highlighted above
Please guide me through this
Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions