Comments (9)
I had to add --config path/to/config/config.ini.php
.
from matomo-log-analytics.
Hello, abhibeckert.
Okay, I'll do that.
Thank you very much.
from matomo-log-analytics.
Good evening.
I added the option (with also idsite) and it still doesn't work.
Here is the message from the terminal:
Traceback (most recent call last):
File "/opt/matomo/matomo-log-analytics/./import_logs.py", line 1588, in _call_api
return json.loads(res)
File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/matomo/matomo-log-analytics/./import_logs.py", line 2688, in <module>
resolver = config.get_resolver()
File "/opt/matomo/matomo-log-analytics/./import_logs.py", line 1131, in get_resolver
return StaticResolver(self.options.site_id)
File "/opt/matomo/matomo-log-analytics/./import_logs.py", line 1663, in __init__
site = matomo.call_api(
File "/opt/matomo/matomo-log-analytics/./import_logs.py", line 1647, in call_api
return self._call_wrapper(self._call_api, None, None, method, **kwargs)
File "/opt/matomo/matomo-log-analytics/./import_logs.py", line 1599, in _call_wrapper
response = func(*args, **kwargs)
File "/opt/matomo/matomo-log-analytics/./import_logs.py", line 1590, in _call_api
raise urllib.error.URLError('Matomo returned an invalid response: ' + res.decode("utf-8") )
AttributeError: 'str' object has no attribute 'decode'
If anyone has any idea what the problem is?
Thank you.
from matomo-log-analytics.
Same issue with a dockerized matomo:4.14.1 and debian 11.
First issue is the config path that could be fixed with "-config" parameter.
Second issue when calling the script... probably because debian 11 is released with python3.9 and script requires 3.7 max?
from matomo-log-analytics.
Hello, marcbria.
Uh, the script would not be compatible out of the box with one of the most used GNU/Linux distributions for WEB servers!
I think in dreaming.
Well, I'll see if I can install Python 3.7, I'll come back here to tell if it worked.
Thank you very much.
from matomo-log-analytics.
I'm a community member... as lost with this as you. ;-)
The script comments talk about 3.5, 3.6 or 3.7 so I'm installing python3.7 right now but I just realize README talks about Python 3.5, 3.6, 3.7, 3.8, 3.9, 3.10.
PD: Tooo late in this side of the earth... I will continue tomorrow.
from matomo-log-analytics.
I am not incriminating you in any way.
Far from me, this idea.
I can imagine that you are as surprised as I am.
It's very late here too, but as I sleep very little, I'm used to it.
Good night to you.
from matomo-log-analytics.
No offense at all.
I installed python3.7 and the problem persisted.
I think the error was more simple than this... I'm tying now with the matomo URL in the url (instead of the place I wanted to track that is referenced by the id param) and I also added a tokenauth.
Call is:
python3 import_logs.py --url=https://YourMatomoUrl --idsite=1 --recorders=8 --enable-http-errors --enable-http-redirects --enable-static --enable-bots /usr/local/apache2/logs/access.log --token-auth=YOURTOKEN
Looks like is working but I'm analyzing 4GB of logs so I can tell for sure... till tomorrow.
from matomo-log-analytics.
Great, obviously you found it, I will test this when I am calmer.
Then I prefer to wait wisely to be sure that you are without surprise before the end of the treatment.
Obviously, 4GB is a lot.
I have smaller files, easier to read.
Edited:
Good, it processes the file (12 MiB).
But I have to search for adding my old access.log files to Matomo.
It's, well, the situation is progressing.
Edited:
I finished the first file, 21 more to go.
Some are a few megs, some are a hundred.
Well, I'll sleep better tonight.
Once I get going, I better not stop.
Edited:
I collected the access.log. files in a directory and ran the command with as access.log.* file which processes all the files in the directory and there is nothing to do but wait.
Eidted:
Thanks to you, abhibeckert and marcbria.
The problem being solved, I close the thread.
from matomo-log-analytics.
Related Issues (20)
- Create a format for a2 hosting log HOT 5
- http part missing within the list of pageviews HOT 3
- Error when importing Apache combined HOT 1
- I offer a working regex for default Nginx Proxy Manager log HOT 1
- log-format-regex does not work even if regex is working fine in python console HOT 1
- Problem importing logs to cPanel install HOT 1
- Don't get any records on Apache HOT 1
- Automate --skip= in the command
- Tracking TLS protocols in IIS logs HOT 2
- import failes with wrong error : file HOT 2
- password with && crashed script HOT 3
- if hostname has no http in it importer together with docker-matomo fails to file ip- adresses clients correctly HOT 8
- Fatal error: the configuration file/config/config.ini.php could not be read. HOT 2
- Incorrect SharePoint Online location HOT 3
- Have anyone try to log import from SHOUTcastv2 or Wowza Media server
- import_logs.py: Silent failure if log file cannot be accessed
- Country guessing from browser language not working properly. HOT 1
- no bot tracked in logs HOT 6
- Subdomain listed as "Page url not defined" in Visits Log HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matomo-log-analytics.