revuel / PatternOmatic

Finds linguistic patterns effortlessly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to import API

fatihbozdag opened this issue · comments

Greatings,

I installed the package via pip. Yet, I am having issues with the import API on IDE. Here is the log. What am I doing wrong?

Traceback (most recent call last):
File "<pyshell#0>", line 1, in
from PatternOmatic.api import find_patterns
File "C:\Users\fatih\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\PatternOmatic\api.py", line 27, in
from PatternOmatic.ge.population import Population
File "C:\Users\fatih\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\PatternOmatic\ge\population.py", line 25, in
from PatternOmatic.ge.individual import Individual
File "C:\Users\fatih\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\PatternOmatic\ge\individual.py", line 29, in
from PatternOmatic.ge.stats import Stats
File "C:\Users\fatih\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\PatternOmatic\ge\stats.py", line 25, in
from PatternOmatic.settings.config import Config
File "C:\Users\fatih\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\PatternOmatic\settings\config.py", line 24, in
from PatternOmatic.settings.log import LOG
File "C:\Users\fatih\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\PatternOmatic\settings\log.py", line 70, in
LOG = get_logger('PatternOmatic')
File "C:\Users\fatih\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\PatternOmatic\settings\log.py", line 65, in get_logger
logger.addHandler(_get_file_handler())
File "C:\Users\fatih\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\PatternOmatic\settings\log.py", line 48, in get_file_handler
file_handler = TimedRotatingFileHandler(LOG_FILE, when='midnight')
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\logging\handlers.py", line 200, in init
BaseRotatingHandler.init(self, filename, 'a', encoding, delay)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\logging\handlers.py", line 55, in init
logging.FileHandler.init(self, filename, mode, encoding, delay)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\logging_init
.py", line 1087, in init
StreamHandler.init(self, self.open())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\logging_init
.py", line 1116, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\tmp\patternomatic.log'

Revertted back to Python 3.7 on mac, no problem so far yet the issue remains on Win.10

Dear @fatihbozdag, I'm sorry for my late reply.

Thanks for opening this issue, thanks a lot for providing this trace, its really helpful.

So, you are totally right: logs won't work on Windows because there's no configuration parameter to specify the logging file at the config.ini or the Config instance, hence it will use the default value which is a Linux path. My bad.

I'll work on it to have it solved as soon as possible.

Dear @fatihbozdag

New version has been published. PatternOmatic should also work on Windows OS.
Let me know if you still face any issues.

Thanks a lot for opening this issue. Now I'm closing it, but I would really appreciate a confirmation by your side that it is solved.

Awesome! Yes it is working like a charm. Thank you for your great work. Indeed I have been looking for such a pattern analysis tool for a very long time (My MA is on pattern grammar and PhD is on tense-aspect structures)

You are welcome and thank you too @fatihbozdag, I'm glad you find this useful