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

TypeError: Path must be a string. Received undefined #166

Closed
samanmohamadi opened this issue Jul 4, 2016 · 3 comments
Closed

TypeError: Path must be a string. Received undefined #166

samanmohamadi opened this issue Jul 4, 2016 · 3 comments

Comments

@samanmohamadi
Copy link

Seems to be node v6 error.
Gettign this error when trying to send photo as stream :
bot.sendPhoto(id,stream)

Error:

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.basename (path.js:1355:5)
    at TelegramBot._formatSendData (/srv/http/bot/node_modules/node-telegram-bot-api/lib/telegram.js:350:35)
    at TelegramBot.sendPhoto (/srv/http/bot/node_modules/node-telegram-bot-api/lib/telegram.js:407:26)
    at onWidthFound (/srv/http/bot/watermark.js:37:11)
    at ChildProcess.exithandler (child_process.js:193:7)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:850:16)
    at Socket.<anonymous> (internal/child_process.js:323:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:492:1
```2
@GochoMugo
Copy link
Collaborator

Please ensure stream is actually a Stream and not undefined as the error explains. It is detected as a stream at this point in the code.

@GochoMugo
Copy link
Collaborator

Your bug might have been addressed in this PR. Please confirm so we can close this issue.

@samanmohamadi
Copy link
Author

unfortunately I don't work on that project and I can't test it right now, So I close this issue hope problem has been solved.

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

2 participants