Giter Site home page Giter Site logo

Comments (18)

RobTillaart avatar RobTillaart commented on May 28, 2024

I am updating libraries and moving them to their own repo. This makes handling issues easier.

Will check on this asap

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

PLatform IO probably takes the copy from my combined repo https://github.com/RobTillaart/Arduino

I updated the DHTNEW lib there too, so now wait until it is picked up by platformIO

Feel free to (re)register the lib yourself, I never registered any of my libs @ platformIO,

https://docs.platformio.org/en/latest/core/userguide/lib/cmd_register.html#cmd-lib-register

from dhtnew.

fmatray avatar fmatray commented on May 28, 2024

Hello,
thanks a lot but I still have a problem. Only the library.json is downloaded, I tried several time.

I also tried to register the library on PlatformIO but it looks like some informations are missing in library.json.

user@prometheus DHTNEW_ID5548 % platformio lib register https://github.com/RobTillaart/Arduino/blob/master/libraries/DHTNEW/library.json
Error: Could not parse manifest -> Expecting value: line 6 column 1 (char 5)

user@prometheus DHTNEW_ID5548 % platformio lib register https://github.com/RobTillaart/Arduino/blob/master/libraries/DHTNEW/library.properties
Error: Invalid manifest fields: {'description': ['Length must be between 1 and 1000.'], 'version': ['Missing data for required field.']}.
Please check specification -> https://docs.platformio.org/page/librarymanager/config.html

user@prometheus DHTNEW_ID5548 % platformio lib register https://github.com/RobTillaart/DHTNew/blob/master/library.json Error: Could not parse manifest -> Expecting value: line 6 column 1 (char 5)

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

Seems like I made an syntax error in the json file. Need to check the specification.
Thanks for the error msg and reporting

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

First I look at the second part of the error message:

description field
verified against - https://docs.platformio.org/en/latest/librarymanager/config.html#description
The description field is a string,
the length is smaller than 255
the length is 95 so between 1 and 1000 (the error message)
So it seems to me that the error message does not mention the real/correct cause

version field
https://docs.platformio.org/en/latest/librarymanager/config.html#version
The version field is a string
The length is smaller than 20
The format is according the semantic versioning rules, three numbers separated by dots .

from dhtnew.

fmatray avatar fmatray commented on May 28, 2024

I agree and I don't understand the message.

I compared with another projet and I can't find any problem.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

Same bug is mentioned - platformio/platformio-libmirror#173
but in that case the version field was indeed not available

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

installed platformio on my computer - c:\users\Rob.platformio\penv\Lib\site-packages

in that folder there are the following python scripts:
platformio\package\exception.py holds the Invalid fields text message [line 34]
printed after a ManifestValidationError

platformio\package\manifest\schema.py raises this ManifestValidationError [line 41, 53]
these lines are probably used by ManifestSchema(baseSchema) [line 150]

this is called in platformio\commands\lib.py [line 505]
that calls ManifestParserFactory.new_from_url(config_url) which is in parser.py

and that loads the file.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

No clue from the code..

The other error

platformio.exe lib register https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTNEW/library.json
returns Error: Could not parse manifest -> Expecting value: line 6 column 1 (char 5)

platformio.exe lib register https://github.com/RobTillaart/DHTNew/library.json
just crashes in a long stacktrace resulting in a 404 error

platformio.exe lib register https://github.com/RobTillaart/DHTNew/blob/master/library.json
Error: Could not parse manifest -> Expecting value: line 6 column 1 (char 5)

So at least after a few hours I am able to reproduce the other error

(edit)
Conclusion (al be it partial)
to register a lib it needs the right path to be able to download the file.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

Did a rewrite of the library.json file - #10
but still got the same error ..

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

OK, I noticed now that you did use the library.PROPERTIES file in the second error message while platformio expects you to give library.JSON file.

WRONG parameter ==> So that one is solved

from dhtnew.

fmatray avatar fmatray commented on May 28, 2024

I tried both, JSON and PROPERTIES, and I get different errors.

As mentioned in URL below, register can take library.json, library.properties or module.json.
I understand, only one is required to register the Library.
https://docs.platformio.org/en/latest/core/userguide/lib/cmd_register.html#description

% platformio lib register https://github.com/RobTillaart/Arduino/blob/master/libraries/DHTNEW/library.json
Error: Could not parse manifest -> Expecting value: line 6 column 1 (char 5)

I very new using PlateformIO.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

Im new to platformIO too. But the error message given on the properties file are sbout missing json fields. So the tools used are not that robust yet.

The other error is still strange, will investigate coming days.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

I tried both, JSON and PROPERTIES, and I get different errors.

As mentioned in URL below, register can take library.json, library.properties or module.json. Only one is needed to register.
https://docs.platformio.org/en/latest/core/userguide/lib/cmd_register.html#description

% platformio lib register https://github.com/RobTillaart/Arduino/blob/master/libraries/DHTNEW/library.json
Error: Could not parse manifest -> Expecting value: line 6 column 1 (char 5)

As far as I understand the register code, the error message came from parsing the library properties file as if it was a library.json file.

The "line 6" error is still there, as said 3 post back, will be working on it later when time permits.

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

Had a quick check with two repo's that have a different library.json file than mine

platformio.exe lib register https://github.com/PaulStoffregen/OneWire.git
platformio.exe lib register https://github.com/milesburton/Arduino-Temperature-Control-Library.git

both gave the same "Line 6" error message on a completely other repository, other file.

So I think you should file an issue at the platformio.org site as the library.json file follows the documentation and the error is seen on at least 3 different instances of the file.

Please let me know if you get a solution from platformio people.

from dhtnew.

alrabe avatar alrabe commented on May 28, 2024

You get the library working when referring directly to it in your projects platform.ini file:

lib_deps = https://github.com/RobTillaart/DHTNew

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

@fmatray
Can you confirm the solution of alrabe?

from dhtnew.

RobTillaart avatar RobTillaart commented on May 28, 2024

As I got no feedback I assume the problem is solved.

from dhtnew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.