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

FileNotFoundError: [Errno 2] No such file or directory: '...\\site-packages\\aanalytics2\\eventType_usageLogs.pickle' #47

Closed
loldenburg opened this issue Feb 14, 2021 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@loldenburg
Copy link
Contributor

I tried to update to the newest version today, but cannot log in anymore. Could it be that the new better logging is related to this? Have no time to check this in detail at the moment, but rolling back for now to older version.

Traceback (most recent call last):
File "C:\Users\Franz\AppData\Local\Programs\Python\Python37\lib\contextlib.py", line 112, in enter
return next(self.gen)
File "C:\Users\Franz\AppData\Local\Programs\Python\Python37\lib\importlib\resources.py", line 201, in path
with open_binary(package, resource) as fp:
File "C:\Users\Franz\AppData\Local\Programs\Python\Python37\lib\importlib\resources.py", line 91, in open_binary
return reader.open_resource(resource)
File "", line 929, in open_resource
FileNotFoundError: [Errno 2] No such file or directory: 'C:\gitrepos\dim28-repo\venv\lib\site-packages\aanalytics2\eventType_usageLogs.pickle'

@pitchmuc pitchmuc self-assigned this Feb 14, 2021
@pitchmuc
Copy link
Owner

Hello,
yes, I noticed and it is already fixed.
please update to version 0.2.4.

For unknown reason, one file was not uploaded to pypi.
https://github.com/pitchmuc/adobe_analytics_api_2.0/blob/master/docs/releases.md

@pitchmuc pitchmuc added the bug Something isn't working label Feb 14, 2021
@loldenburg
Copy link
Contributor Author

Thanks, but still does not work.

ERROR:root:Fatal Error in xxx.py: [Errno 2] No such file or directory: 'D:\xxx\venv2\lib\site-packages\aanalytics2\eventType_usageLogs.pickle'

@pitchmuc
Copy link
Owner

pitchmuc commented Feb 15, 2021

"Interesting", your folder after installation should looks like this.
You may are missing the pickle files.
image

@pitchmuc
Copy link
Owner

Downloading the file from pypi, I can confirm that the file are in the wheel installation...
image

Source : https://pypi.org/project/aanalytics2/#files

@loldenburg
Copy link
Contributor Author

loldenburg commented Feb 15, 2021

I install via git+https://github.com/pitchmuc/adobe_analytics_api_2.0.git@832ada23c9daaec358eb12267aaa096ad7c51925#egg=aanalytics2

BUt that should be your latest commit in Github.

@loldenburg
Copy link
Contributor Author

are these pickle files a standard everywhere?

@pitchmuc
Copy link
Owner

They are files storing information to help with the use of the module.
Basically, encapsulating the documentation references as dataframe.
Example:
image

or
image

@pitchmuc
Copy link
Owner

pitchmuc commented Feb 15, 2021

@loldenburg Can you try again with the latest commit (71384e7) ?
I have made modification and added a MANIFEST.IN file to include the data.
So it should work (you should have the files), if not I have put safeguard so it doesn't break anymore.
You just won't have the references I have provided directly in the python module.

@loldenburg
Copy link
Contributor Author

wonderful, that fixed it! THANKS!

@loldenburg
Copy link
Contributor Author

Note however that the pickle files are still not downloaded (cannot see them in my aanalytics2 folders).

@pitchmuc
Copy link
Owner

pitchmuc commented Feb 15, 2021

OK... they are in the repo as well...
It seems that you do not pick them for some reason.

Is there a specific reason for not using pip install aanalytics2 --upgrade ?

@loldenburg
Copy link
Contributor Author

loldenburg commented Feb 15, 2021

In Google Cloud Repositories, you specify the module dependencies in a requirements.txt file, so there is no pip.
But in that file, you can simply do
aanalytics2==0.2.4

I think the fact that I include your lib via Github is still from the time when your library did not support pip, it is also needed to get library versions or forks thereof which were not officially released (yet), e.g. to work around issues or test sth befor releasing it. Most importantly, it is probably one of those "never touch a running system" as every change I make usually breaks sth somewhere in the many scripts that already run on your wrapper (thanks!).

As long as the pip release version is avaible and stable, I think I could switch to pip for this library as well.
Will try.

@loldenburg
Copy link
Contributor Author

Local Test: Very interesting, this time the pickle files were indeed downloaded to the folders. Strange because that would mean there is no synchronicity between GIthub and pip modules in some cases.

Now for the cloud test...

@pitchmuc
Copy link
Owner

pitchmuc commented Feb 15, 2021

I also tested your way of installing it and it downloaded the files as well.
I am not sure why you couldn't with your pip command.
As you said, it can be a cache issue that you were still retrieveing old setup.

@loldenburg
Copy link
Contributor Author

"I am not sure why you couldn't with your pip command."
I never used a pip command. I always did it via requirements.txt.

Cloud test also successful! :)

@pitchmuc
Copy link
Owner

Thanks for letting me know.
As a note:
Normally for major fix (when there is something broken) I tend to do a quick release on pypi.
It may be then the preferred default method.
For other elements (adding new endpoints, etc..) I may be slower and then you may want to re-use the pip git+https...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants