Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paths on Windows may be getting mangled #18

Open
kealist opened this issue Jan 28, 2022 · 3 comments
Open

Paths on Windows may be getting mangled #18

kealist opened this issue Jan 28, 2022 · 3 comments

Comments

@kealist
Copy link

kealist commented Jan 28, 2022

  • skipchunk version: latest
  • Python version: 3.8
  • Operating System: Windows

Description

I started working through the solr example (I have it saved with the name skipchunker.py, but it is the solr example) on Windows but I'm getting some fun path issues. it looks like it's truncating the path name to skipchun and generally doesn't support windows paths.


FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\kealist\\code\\git\\scraped-data\\src\\.venv\\lib\\site-packages\\skipchun\\skipchunk/solr_home/configsets/skipchunk-graph-configset'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:/Users/kealist/code/git/scraped-data/src/skipchunker.py", line 64, in <module>
    gq.index(s)
  File "C:\Users\kealist\code\git\scraped-data\src\.venv\lib\site-packages\skipchunk\graphquery.py", line 99, in index
    ok1 = self.engine.index(predicatedocs,timeout=timeout)
  File "C:\Users\kealist\code\git\scraped-data\src\.venv\lib\site-packages\skipchunk\solr.py", line 182, in index
    isCore = self.indexCreate()
  File "C:\Users\kealist\code\git\scraped-data\src\.venv\lib\site-packages\skipchunk\solr.py", line 153, in indexCreate
    raise ValueError(message)
ValueError: DISK ERROR! Could not find the schema at C:\Users\kealist\code\git\scraped-data\src\.venv\lib\site-packages\skipchun\skipchunk/solr_home/configsets/skipchunk-graph-configset

An additional issue, lxml v 4.5.2 is not compatible with python 3.10 on windows--it will install on 3.8 though, so if it's possible to update that dependency, it would be awesome

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
@kealist
Copy link
Author

kealist commented Jan 28, 2022

https://github.com/o19s/skipchunk/blob/master/skipchunk/utilities.py#L16 is the offending line

module_dir = os.path.dirname(os.path.abspath(__file__))
print(module_dir)
source_dir = module_dir[0:module_dir.rfind('/')]
print(source_dir)

#FIX

source_dir = os.path.join(os.path.dirname(module_dir), '')
print(source_dir)

results in:


c:\Users\kealist\code\git\scraped-data\src\
c:\Users\kealist\code\git\scraped-data\sr
c:\Users\kealist\code\git\scraped-data\

@kealist
Copy link
Author

kealist commented Feb 9, 2022

Wanted to touch base to see if there is any way to get a release with the fix in it as I would really like to try to use this lib.

@kealist
Copy link
Author

kealist commented May 19, 2022

Any way to get a new package with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant